mirror of https://github.com/LemmyNet/lemmy.git
clippy
parent
aaf3833d12
commit
89976b83f6
|
@ -800,7 +800,7 @@ pub async fn process_markdown_opt(
|
|||
slur_regex: &Option<Regex>,
|
||||
) -> LemmyResult<Option<String>> {
|
||||
match text {
|
||||
Some(t) => process_markdown(&t, slur_regex).await.map(Some),
|
||||
Some(t) => process_markdown(t, slur_regex).await.map(Some),
|
||||
None => Ok(None),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ pub fn markdown_rewrite_image_links(mut src: String) -> String {
|
|||
|
||||
// Go through the collected links
|
||||
while let Some((start, end)) = links.pop() {
|
||||
let url = &src[start..end];
|
||||
let url = &src.get(start..end).unwrap_or_default();
|
||||
match Url::parse(url) {
|
||||
Ok(parsed) => {
|
||||
// If link points to remote domain, replace with proxied link
|
||||
|
|
Loading…
Reference in New Issue