Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[clippy] Roll the rock back up the hill #1148

Merged
merged 1 commit into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions fontbe/src/features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion fontc/src/workload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion fontc_crater/src/ci.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ fn run_crater_and_save_results(args: &CiArgs) -> Result<(), Error> {
let mut prev_runs: Vec<RunSummary> = 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()
Expand Down
5 changes: 3 additions & 2 deletions fontc_crater/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,16 @@ fn get_git_rev(repo_path: Option<&Path>) -> Option<String> {
}

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")
Expand Down
2 changes: 1 addition & 1 deletion fontra2fontir/src/toir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ pub(crate) fn to_ir_static_metadata(font_data: &FontraFontData) -> Result<Static
.iter()
.position(|(u, _)| *u == default)
.filter(|_| has_min_max)
.ok_or_else(|| Error::MissingAxisMapping(a.tag))?;
.ok_or(Error::MissingAxisMapping(a.tag))?;
CoordConverter::new(examples, default_idx)
} else {
CoordConverter::unmapped(min, default, max)
Expand Down
2 changes: 1 addition & 1 deletion glyphs-reader/src/plist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ pub struct Tokenizer<'a> {
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());
Expand Down