Replace split_n(2, ...)
with split_once
(#344)
This commit is contained in:
parent
d05bcba02c
commit
5aa543a6c2
1 changed files with 1 additions and 6 deletions
|
@ -12,12 +12,7 @@ fn main() -> Result<(), Box<dyn Error>> {
|
|||
}
|
||||
let entries = args[2..]
|
||||
.iter()
|
||||
.map(|arg| {
|
||||
let mut splits = arg.splitn(2, ':');
|
||||
let slug = splits.next().unwrap();
|
||||
let input_path = splits.next().unwrap();
|
||||
(slug, input_path)
|
||||
})
|
||||
.map(|arg| arg.split_once(':').unwrap())
|
||||
.collect::<Vec<_>>();
|
||||
build_nav(&entries, &args[1])
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue