aboutsummaryrefslogtreecommitdiff
path: root/xtask/src/tidy.rs
diff options
context:
space:
mode:
authorClemens Wasser <[email protected]>2021-06-03 11:46:56 +0100
committerClemens Wasser <[email protected]>2021-06-03 11:46:56 +0100
commit629e8d1ed0aeabf27a1e1b1d3c8c9134716043e3 (patch)
treec55fdaf665ba247aa5df4f9912290fd5ddd1841a /xtask/src/tidy.rs
parent3c6dc0f89dc9c2902d71e8639b4913917a396f8a (diff)
Apply more clippy suggestions and update generated
Diffstat (limited to 'xtask/src/tidy.rs')
-rw-r--r--xtask/src/tidy.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/xtask/src/tidy.rs b/xtask/src/tidy.rs
index 6f687a788..e1a62da27 100644
--- a/xtask/src/tidy.rs
+++ b/xtask/src/tidy.rs
@@ -33,7 +33,7 @@ fn check_code_formatting() {
33 let _e = pushenv("RUSTUP_TOOLCHAIN", "stable"); 33 let _e = pushenv("RUSTUP_TOOLCHAIN", "stable");
34 crate::ensure_rustfmt().unwrap(); 34 crate::ensure_rustfmt().unwrap();
35 let res = cmd!("cargo fmt -- --check").run(); 35 let res = cmd!("cargo fmt -- --check").run();
36 if !res.is_ok() { 36 if res.is_err() {
37 let _ = cmd!("cargo fmt").run(); 37 let _ = cmd!("cargo fmt").run();
38 } 38 }
39 res.unwrap() 39 res.unwrap()
@@ -244,19 +244,19 @@ Zlib OR Apache-2.0 OR MIT
244 .map(|it| it.trim()) 244 .map(|it| it.trim())
245 .map(|it| it[r#""license":"#.len()..].trim_matches('"')) 245 .map(|it| it[r#""license":"#.len()..].trim_matches('"'))
246 .collect::<Vec<_>>(); 246 .collect::<Vec<_>>();
247 licenses.sort(); 247 licenses.sort_unstable();
248 licenses.dedup(); 248 licenses.dedup();
249 if licenses != expected { 249 if licenses != expected {
250 let mut diff = String::new(); 250 let mut diff = String::new();
251 251
252 diff += &format!("New Licenses:\n"); 252 diff += &"New Licenses:\n".to_string();
253 for &l in licenses.iter() { 253 for &l in licenses.iter() {
254 if !expected.contains(&l) { 254 if !expected.contains(&l) {
255 diff += &format!(" {}\n", l) 255 diff += &format!(" {}\n", l)
256 } 256 }
257 } 257 }
258 258
259 diff += &format!("\nMissing Licenses:\n"); 259 diff += &"\nMissing Licenses:\n".to_string();
260 for &l in expected.iter() { 260 for &l in expected.iter() {
261 if !licenses.contains(&l) { 261 if !licenses.contains(&l) {
262 diff += &format!(" {}\n", l) 262 diff += &format!(" {}\n", l)