mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 03:57:44 +00:00
cp: use inclusive range
as suggested by clippy::range-plus-one
This commit is contained in:
parent
d046d33bee
commit
ee7f99aad0
1 changed files with 1 additions and 1 deletions
|
@ -1622,7 +1622,7 @@ fn aligned_ancestors<'a>(source: &'a Path, dest: &'a Path) -> Vec<(&'a Path, &'a
|
|||
// Get the matching number of elements from the ancestors of the
|
||||
// destination path (for example, get "d/a" and "d/a/b").
|
||||
let k = source_ancestors.len();
|
||||
let dest_ancestors = &dest_ancestors[1..1 + k];
|
||||
let dest_ancestors = &dest_ancestors[1..=k];
|
||||
|
||||
// Now we have two slices of the same length, so we zip them.
|
||||
let mut result = vec![];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue