mirror of
https://git.joinplu.me/Plume/Plume.git
synced 2024-11-10 14:11:00 +00:00
Replace as_ref().map() with as_deref()
This commit is contained in:
parent
0775c8f3f9
commit
dfe83aafc5
2 changed files with 2 additions and 2 deletions
|
@ -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 a new issue