From e5532417502e939df5bb4d21d515d1c9e9ae995f Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Thu, 31 Mar 2022 00:27:21 +0200 Subject: [PATCH] ln: rustfmt the recent changes --- src/uu/ln/src/ln.rs | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/uu/ln/src/ln.rs b/src/uu/ln/src/ln.rs index 0d9d8579e..4d0495e6d 100644 --- a/src/uu/ln/src/ln.rs +++ b/src/uu/ln/src/ln.rs @@ -63,13 +63,12 @@ impl Display for LnError { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { 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::SameFile(e, e2) => write!( - f, - "{} and {} are the same file", - e2.quote(), - e.quote() - ), + Self::FailedToLink(s, d, e) => { + write!(f, "failed to link {} to {}: {}", s.quote(), d.quote(), e) + } + Self::SameFile(e, e2) => { + write!(f, "{} and {} are the same file", e2.quote(), e.quote()) + } Self::SomeLinksFailed => write!(f, "some links failed to create"), Self::MissingDestination(s) => { 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) { 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(), + ) + } } }