mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 03:57:44 +00:00
rustfmt
This commit is contained in:
parent
ea3c15f0dd
commit
14459cf611
2 changed files with 9 additions and 6 deletions
|
@ -107,10 +107,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
|
||||||
if recursive {
|
if recursive {
|
||||||
if bit_flag == FTS_PHYSICAL {
|
if bit_flag == FTS_PHYSICAL {
|
||||||
if derefer == 1 {
|
if derefer == 1 {
|
||||||
return Err(USimpleError::new(
|
return Err(USimpleError::new(1, "-R --dereference requires -H or -L"));
|
||||||
1,
|
|
||||||
"-R --dereference requires -H or -L",
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
derefer = 0;
|
derefer = 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -279,7 +279,10 @@ pub struct USimpleError {
|
||||||
impl USimpleError {
|
impl USimpleError {
|
||||||
#[allow(clippy::new_ret_no_self)]
|
#[allow(clippy::new_ret_no_self)]
|
||||||
pub fn new<S: Into<String>>(code: i32, message: S) -> Box<dyn UError> {
|
pub fn new<S: Into<String>>(code: i32, message: S) -> Box<dyn UError> {
|
||||||
Box::new(Self { code, message: message.into() })
|
Box::new(Self {
|
||||||
|
code,
|
||||||
|
message: message.into(),
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -306,7 +309,10 @@ pub struct UUsageError {
|
||||||
impl UUsageError {
|
impl UUsageError {
|
||||||
#[allow(clippy::new_ret_no_self)]
|
#[allow(clippy::new_ret_no_self)]
|
||||||
pub fn new<S: Into<String>>(code: i32, message: S) -> Box<dyn UError> {
|
pub fn new<S: Into<String>>(code: i32, message: S) -> Box<dyn UError> {
|
||||||
Box::new(Self { code, message: message.into() })
|
Box::new(Self {
|
||||||
|
code,
|
||||||
|
message: message.into(),
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue