mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-08-05 07:27:46 +00:00
Fix a few clippy warnings
This commit is contained in:
parent
bd450ebb94
commit
de7a6b5afa
3 changed files with 4 additions and 4 deletions
|
@ -18,7 +18,7 @@ impl<'a> CoreOptions<'a> {
|
||||||
pub fn new(help_text: HelpText<'a>) -> Self {
|
pub fn new(help_text: HelpText<'a>) -> Self {
|
||||||
let mut ret = CoreOptions {
|
let mut ret = CoreOptions {
|
||||||
options: getopts::Options::new(),
|
options: getopts::Options::new(),
|
||||||
help_text: help_text,
|
help_text,
|
||||||
};
|
};
|
||||||
ret.options
|
ret.options
|
||||||
.optflag("", "help", "print usage information")
|
.optflag("", "help", "print usage information")
|
||||||
|
|
|
@ -66,8 +66,8 @@ impl<R: Read> Data<R> {
|
||||||
Data {
|
Data {
|
||||||
line_wrap: 76,
|
line_wrap: 76,
|
||||||
ignore_garbage: false,
|
ignore_garbage: false,
|
||||||
input: input,
|
input,
|
||||||
format: format,
|
format,
|
||||||
alphabet: match format {
|
alphabet: match format {
|
||||||
Base32 => b"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",
|
Base32 => b"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",
|
||||||
Base64 => b"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789=+/",
|
Base64 => b"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789=+/",
|
||||||
|
|
|
@ -31,7 +31,7 @@ macro_rules! has {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn resolve_relative_path<'a>(path: &'a Path) -> Cow<'a, Path> {
|
pub fn resolve_relative_path(path: &Path) -> Cow<Path> {
|
||||||
if path.components().all(|e| e != Component::ParentDir) {
|
if path.components().all(|e| e != Component::ParentDir) {
|
||||||
return path.into();
|
return path.into();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue