Fix clippy.
This commit is contained in:
parent
3b63bbdfde
commit
35cf675c87
@ -32,7 +32,7 @@ render!(RenderRegularLink, IRegularLink, original, render_context, {
|
|||||||
.unwrap_or_else(|| "".to_owned());
|
.unwrap_or_else(|| "".to_owned());
|
||||||
|
|
||||||
Ok(RenderRegularLink {
|
Ok(RenderRegularLink {
|
||||||
target: target,
|
target,
|
||||||
raw_link: original.raw_link.clone(),
|
raw_link: original.raw_link.clone(),
|
||||||
children,
|
children,
|
||||||
post_blank: original.post_blank,
|
post_blank: original.post_blank,
|
||||||
|
@ -64,8 +64,8 @@ impl LinkTarget {
|
|||||||
let post_id = parsed.host_str().map(str::to_owned);
|
let post_id = parsed.host_str().map(str::to_owned);
|
||||||
let subpath = {
|
let subpath = {
|
||||||
let subpath = parsed.path();
|
let subpath = parsed.path();
|
||||||
if subpath.starts_with('/') {
|
if let Some(subpath) = subpath.strip_prefix('/') {
|
||||||
&subpath[1..]
|
subpath
|
||||||
} else {
|
} else {
|
||||||
subpath
|
subpath
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user