Fix clippy.
All checks were successful
format Build format has succeeded
rust-clippy Build rust-clippy has succeeded
rust-test Build rust-test has succeeded

This commit is contained in:
Tom Alexander
2023-12-23 21:36:24 -05:00
parent 3b63bbdfde
commit 35cf675c87
2 changed files with 3 additions and 3 deletions

View File

@@ -64,8 +64,8 @@ impl LinkTarget {
let post_id = parsed.host_str().map(str::to_owned);
let subpath = {
let subpath = parsed.path();
if subpath.starts_with('/') {
&subpath[1..]
if let Some(subpath) = subpath.strip_prefix('/') {
subpath
} else {
subpath
}