Skip to content

Commit

Permalink
chore: fix clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
thatRichman committed Jan 17, 2025
1 parent 7a801b0 commit 74f64a3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions wdl-lint/src/fix.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//! Module for applying fixes for diagnostics.
use std::ops::Range;
use std::ops::RangeInclusive;

use ftree::FenwickTree;
use serde::Deserialize;
Expand Down Expand Up @@ -122,7 +121,7 @@ impl Fixer {
i32::try_from(replacement.value().len()).expect("replacement length fits into i32");
let range = i32::try_from(old_end - old_start).expect("range fits into i32");
let shift = rep_len - range;
let insert_at = match replacement.insertion_point {
let insert_at = match replacement.insertion_point() {
InsertionPoint::BeforeStart => old_start,
InsertionPoint::AfterEnd => old_end + 1,
};
Expand All @@ -143,7 +142,7 @@ impl Fixer {
/// Order is determined by the precedence field.
/// Higher precedences are applied first.
pub fn apply_replacements(&mut self, mut reps: Vec<Replacement>) {
reps.sort_by_key(|r| r.precedence);
reps.sort_by_key(|r| r.precedence());
reps.iter().rev().for_each(|r| self.apply_replacement(r));
}

Expand Down

0 comments on commit 74f64a3

Please sign in to comment.