Skip to content

Commit c9ecbf1

Browse files
ref(utils): Fix clippy lint (#116)
Unblocks #233
1 parent 8342f22 commit c9ecbf1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use std::borrow::Cow;
2-
use std::iter::repeat;
2+
use std::iter;
33

44
fn split_path(path: &str) -> Vec<&str> {
55
let mut last_idx = 0;
@@ -105,7 +105,7 @@ pub fn make_relative_path(base: &str, target: &str) -> String {
105105
let prefix = find_common_prefix_of_sorted_vec(&items)
106106
.map(|x| x.len())
107107
.unwrap_or(0);
108-
let mut rel_list: Vec<_> = repeat("../").take(base_path.len() - prefix).collect();
108+
let mut rel_list: Vec<_> = iter::repeat_n("../", base_path.len() - prefix).collect();
109109
rel_list.extend_from_slice(&target_path[prefix..]);
110110
if rel_list.is_empty() {
111111
".".into()

0 commit comments

Comments
 (0)