chore: fix formatting

This commit is contained in:
pimlie 2024-07-04 18:10:12 +02:00
parent 055382601b
commit 3e2327c51c

View file

@ -1131,17 +1131,9 @@ pub fn url_path_basename(path: &str) -> String {
path.to_string()
} else {
let mut url = url_result.unwrap();
url
.path_segments_mut()
.unwrap()
.pop_if_empty();
url.path_segments_mut().unwrap().pop_if_empty();
url
.path_segments()
.unwrap()
.last()
.unwrap()
.to_string()
url.path_segments().unwrap().last().unwrap().to_string()
}
}
@ -1268,4 +1260,4 @@ fn test_url_path_basename() {
assert_eq!(url_path_basename("https://doma.in/first/last"), "last");
// empty path
assert_eq!(url_path_basename("/"), "");
}
}