mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
rustfmt
This commit is contained in:
@@ -107,10 +107,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
|
||||
if recursive {
|
||||
if bit_flag == FTS_PHYSICAL {
|
||||
if derefer == 1 {
|
||||
return Err(USimpleError::new(
|
||||
1,
|
||||
"-R --dereference requires -H or -L",
|
||||
));
|
||||
return Err(USimpleError::new(1, "-R --dereference requires -H or -L"));
|
||||
}
|
||||
derefer = 0;
|
||||
}
|
||||
|
||||
@@ -279,7 +279,10 @@ pub struct USimpleError {
|
||||
impl USimpleError {
|
||||
#[allow(clippy::new_ret_no_self)]
|
||||
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 {
|
||||
#[allow(clippy::new_ret_no_self)]
|
||||
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(),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user