Replace some std::iter::repeat with str::repeat

This commit is contained in:
r00ster91 2021-06-04 14:32:47 +02:00
parent 6f5a198ffc
commit c08ea1724b
4 changed files with 5 additions and 9 deletions

View file

@ -19,9 +19,7 @@ use std::path::Path;
pub fn parse_summary<R: Read>(_: R, _: &Path) {
let path_from_root = Path::new("");
Path::new(&iter::repeat("../")
.take(path_from_root.components().count() - 1)
.collect::<String>());
Path::new(&"../".repeat(path_from_root.components().count() - 1));
}
fn foo() {