Removed warnings

This commit is contained in:
Justine Pelletreau
2023-02-03 13:37:45 +01:00
parent 1b57352393
commit 28783a5d1b
3 changed files with 6 additions and 10 deletions

View File

@ -55,7 +55,7 @@ fn autocomplete_file(input: &String) -> std::io::Result<(String, String)> {
if input_searchee.contains('/') {
//Correctly taking first and last part...
let splitted_searchstring = &input_searchee.split('/');
let mut trimmed_searchee = &splitted_searchstring.clone().last().unwrap();
let trimmed_searchee = &splitted_searchstring.clone().last().unwrap();
let splitted_searchstring = &mut input_searchee.clone().split('/').collect::<Vec<&str>>();
splitted_searchstring.pop();
let mut tosearch = splitted_searchstring.join("/");