From 845a64923d3373e5128fe15008f4700be20c9ebe Mon Sep 17 00:00:00 2001 From: Colin Rofls Date: Thu, 28 Nov 2024 12:37:35 -0500 Subject: [PATCH] [clippy] Roll the rock back up the hill --- fontbe/src/features.rs | 4 ++-- fontc/src/workload.rs | 2 +- fontc_crater/src/ci.rs | 2 +- fontc_crater/src/main.rs | 5 +++-- fontra2fontir/src/toir.rs | 2 +- glyphs-reader/src/plist.rs | 2 +- 6 files changed, 9 insertions(+), 8 deletions(-) diff --git a/fontbe/src/features.rs b/fontbe/src/features.rs index a3c64d99c..93bf3c716 100644 --- a/fontbe/src/features.rs +++ b/fontbe/src/features.rs @@ -281,14 +281,14 @@ impl<'a> FeatureWriter<'a> { } } -impl<'a> FeatureProvider for FeatureWriter<'a> { +impl FeatureProvider for FeatureWriter<'_> { fn add_features(&self, builder: &mut FeatureBuilder) { self.add_kerning_features(builder); self.add_marks(builder); } } -impl<'a> VariationInfo for FeaVariationInfo<'a> { +impl VariationInfo for FeaVariationInfo<'_> { type Error = Error; fn axis(&self, axis_tag: Tag) -> Option<(usize, &Axis)> { self.axes.get(&axis_tag).map(|(i, a)| (*i, *a)) diff --git a/fontc/src/workload.rs b/fontc/src/workload.rs index 29ce5cc06..3a89d029e 100644 --- a/fontc/src/workload.rs +++ b/fontc/src/workload.rs @@ -94,7 +94,7 @@ fn priority(id: &AnyWorkId) -> u32 { } impl<'a> Workload<'a> { - pub fn new(change_detector: &'a ChangeDetector, timer: JobTimer) -> Workload { + pub fn new(change_detector: &'a ChangeDetector, timer: JobTimer) -> Workload<'a> { Workload { change_detector, job_count: 0, diff --git a/fontc_crater/src/ci.rs b/fontc_crater/src/ci.rs index 059d33dca..9a7369711 100644 --- a/fontc_crater/src/ci.rs +++ b/fontc_crater/src/ci.rs @@ -87,7 +87,7 @@ fn run_crater_and_save_results(args: &CiArgs) -> Result<(), Error> { let mut prev_runs: Vec = load_json_if_exists_else_default(&summary_file)?; // todo: fontc_repo should be checked out by us, and have a known path let fontc_rev = super::get_git_rev(None).unwrap(); - let pip_freeze_sha = dbg!(super::pip_freeze_sha()); + let pip_freeze_sha = super::pip_freeze_sha(); if let Some(last_run) = prev_runs.last() { if last_run.fontc_rev == fontc_rev && Some(last_run.input_file.as_os_str()) == args.to_run.file_name() diff --git a/fontc_crater/src/main.rs b/fontc_crater/src/main.rs index df75d48b0..4296e83fa 100644 --- a/fontc_crater/src/main.rs +++ b/fontc_crater/src/main.rs @@ -114,15 +114,16 @@ fn get_git_rev(repo_path: Option<&Path>) -> Option { } fn pip_freeze_sha() -> String { - let pipfreeze = Command::new("pip") + let mut pipfreeze = Command::new("pip") .arg("freeze") .stdout(Stdio::piped()) .spawn() .unwrap(); let sha1sum = Command::new("shasum") - .stdin(Stdio::from(pipfreeze.stdout.unwrap())) + .stdin(Stdio::from(pipfreeze.stdout.take().unwrap())) .output() .expect("shasum should be preinstalled everywhere"); + pipfreeze.wait().unwrap(); assert!(sha1sum.status.success()); std::str::from_utf8(sha1sum.stdout.trim_ascii()) .expect("shasum output always ascii") diff --git a/fontra2fontir/src/toir.rs b/fontra2fontir/src/toir.rs index 8a4524d7d..1dd611e14 100644 --- a/fontra2fontir/src/toir.rs +++ b/fontra2fontir/src/toir.rs @@ -53,7 +53,7 @@ pub(crate) fn to_ir_static_metadata(font_data: &FontraFontData) -> Result { idx: usize, } -impl<'a> Debug for Tokenizer<'a> { +impl Debug for Tokenizer<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { let start = self.idx; let end = (start + 16).min(self.content.len());