mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
ln: rustfmt the recent changes
This commit is contained in:
parent
526370f922
commit
e553241750
1 changed files with 12 additions and 8 deletions
|
@ -63,13 +63,12 @@ impl Display for LnError {
|
||||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
match self {
|
match self {
|
||||||
Self::TargetIsDirectory(s) => write!(f, "target {} is not a directory", s.quote()),
|
Self::TargetIsDirectory(s) => write!(f, "target {} is not a directory", s.quote()),
|
||||||
Self::FailedToLink(s, d, e) => write!(f, "failed to link {} to {}: {}", s.quote(), d.quote(), e),
|
Self::FailedToLink(s, d, e) => {
|
||||||
Self::SameFile(e, e2) => write!(
|
write!(f, "failed to link {} to {}: {}", s.quote(), d.quote(), e)
|
||||||
f,
|
}
|
||||||
"{} and {} are the same file",
|
Self::SameFile(e, e2) => {
|
||||||
e2.quote(),
|
write!(f, "{} and {} are the same file", e2.quote(), e.quote())
|
||||||
e.quote()
|
}
|
||||||
),
|
|
||||||
Self::SomeLinksFailed => write!(f, "some links failed to create"),
|
Self::SomeLinksFailed => write!(f, "some links failed to create"),
|
||||||
Self::MissingDestination(s) => {
|
Self::MissingDestination(s) => {
|
||||||
write!(f, "missing destination file operand after {}", s.quote())
|
write!(f, "missing destination file operand after {}", s.quote())
|
||||||
|
@ -293,7 +292,12 @@ fn exec(files: &[PathBuf], settings: &Settings) -> UResult<()> {
|
||||||
|
|
||||||
match link(&files[0], &files[1], settings) {
|
match link(&files[0], &files[1], settings) {
|
||||||
Ok(_) => Ok(()),
|
Ok(_) => Ok(()),
|
||||||
Err(e) => Err(LnError::FailedToLink(files[0].to_owned(), files[1].to_owned(), e.to_string()).into()),
|
Err(e) => {
|
||||||
|
Err(
|
||||||
|
LnError::FailedToLink(files[0].to_owned(), files[1].to_owned(), e.to_string())
|
||||||
|
.into(),
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue