Replace as_ref().map() with as_deref()
This commit is contained in:
parent
0775c8f3f9
commit
dfe83aafc5
@ -55,7 +55,7 @@ pub fn search(query: Option<Form<SearchQuery>>, rockets: PlumeRocket) -> Ructe {
|
||||
let query = query.map(Form::into_inner).unwrap_or_default();
|
||||
let page = query.page.unwrap_or_default();
|
||||
let mut parsed_query =
|
||||
Query::from_str(&query.q.as_ref().map(String::as_str).unwrap_or_default())
|
||||
Query::from_str(&query.q.as_deref().unwrap_or_default())
|
||||
.unwrap_or_default();
|
||||
|
||||
param_to_query!(query, parsed_query; normal: title, subtitle, content, tag,
|
||||
|
@ -42,7 +42,7 @@
|
||||
}
|
||||
</main>
|
||||
@for res in &comment_tree.responses {
|
||||
@:comment_html(ctx, res, comm.ap_url.as_ref().map(|u| &**u), blog, slug)
|
||||
@:comment_html(ctx, res, comm.ap_url.as_deref(), blog, slug)
|
||||
}
|
||||
</div>
|
||||
}}
|
||||
|
Loading…
Reference in New Issue
Block a user