aboutsummaryrefslogtreecommitdiff
path: root/crates/tools
diff options
context:
space:
mode:
authorAlan Du <[email protected]>2018-10-16 16:51:58 +0100
committerAlan Du <[email protected]>2018-10-18 00:42:23 +0100
commitd493a4476c2059924d032fbf01dda091601f9667 (patch)
tree74c1249cba67c8c9824e618fcdea53b97b571a7b /crates/tools
parent5db663d61fb8b006e3b84ef3bcc9cddbe94e5f49 (diff)
clippy: Use if lets and remove redundant returns
Diffstat (limited to 'crates/tools')
-rw-r--r--crates/tools/src/main.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/tools/src/main.rs b/crates/tools/src/main.rs
index 152298014..fdb443690 100644
--- a/crates/tools/src/main.rs
+++ b/crates/tools/src/main.rs
@@ -112,9 +112,8 @@ fn existing_tests(dir: &Path) -> Result<HashMap<String, (PathBuf, Test)>> {
112 name: name.clone(), 112 name: name.clone(),
113 text, 113 text,
114 }; 114 };
115 match res.insert(name, (path, test)) { 115 if let Some(old) = res.insert(name, (path, test)) {
116 Some(old) => println!("Duplicate test: {:?}", old), 116 println!("Duplicate test: {:?}", old);
117 None => (),
118 } 117 }
119 } 118 }
120 Ok(res) 119 Ok(res)