Fix clippy.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user