From c523ce601d15c9ae687c30c2c8912f8cd9ad0424 Mon Sep 17 00:00:00 2001 From: k-nasa Date: Sat, 29 Dec 2018 09:52:52 +0900 Subject: [PATCH 1/2] refactor: delete unnecessary return keyword --- src/cargo/core/compiler/context/compilation_files.rs | 4 ++-- src/cargo/core/compiler/context/mod.rs | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/cargo/core/compiler/context/compilation_files.rs b/src/cargo/core/compiler/context/compilation_files.rs index ece26253764..01d48287f89 100644 --- a/src/cargo/core/compiler/context/compilation_files.rs +++ b/src/cargo/core/compiler/context/compilation_files.rs @@ -53,10 +53,10 @@ pub struct OutputFile { impl OutputFile { /// Gets the hardlink if present. Otherwise returns the path. pub fn bin_dst(&self) -> &PathBuf { - return match self.hardlink { + match self.hardlink { Some(ref link_dst) => link_dst, None => &self.path, - }; + } } } diff --git a/src/cargo/core/compiler/context/mod.rs b/src/cargo/core/compiler/context/mod.rs index 8a485db7c5a..3b98261267b 100644 --- a/src/cargo/core/compiler/context/mod.rs +++ b/src/cargo/core/compiler/context/mod.rs @@ -285,7 +285,8 @@ impl<'a, 'cfg> Context<'a, 'cfg> { return Ok(Option::Some(output.bin_dst().clone())); } } - return Ok(None); + + Ok(None) } pub fn prepare_units( From 3b244e29da4da9ef52ae1914eb08bb72089e686b Mon Sep 17 00:00:00 2001 From: k-nasa Date: Sat, 29 Dec 2018 10:50:31 +0900 Subject: [PATCH 2/2] Delete unnecessary space --- src/cargo/core/compiler/context/mod.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/cargo/core/compiler/context/mod.rs b/src/cargo/core/compiler/context/mod.rs index 3b98261267b..6285fa19673 100644 --- a/src/cargo/core/compiler/context/mod.rs +++ b/src/cargo/core/compiler/context/mod.rs @@ -285,7 +285,6 @@ impl<'a, 'cfg> Context<'a, 'cfg> { return Ok(Option::Some(output.bin_dst().clone())); } } - Ok(None) }