Skip to content

Commit

Permalink
Satisfy clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
riquito committed Dec 1, 2023
1 parent 95bd8e2 commit b3e8742
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/cut_str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ fn complement_std_range(parts_length: usize, r: &Range<usize>) -> Vec<Range<usiz
// full match => no match
(0, end) if end == parts_length => Vec::new(),
// match left side => match right side
#[allow(clippy::single_range_in_vec_init)]
(0, right) => vec![right..parts_length],
// match right side => match left side
#[allow(clippy::single_range_in_vec_init)]
(left, end) if end == parts_length => vec![0..left],
// match middle of string => match before and after
(left, right) => vec![0..left, right..parts_length],
Expand Down

0 comments on commit b3e8742

Please sign in to comment.