Use .as_deref() instead of .as_ref().map(Deref::deref) (clippy::option_as_ref_deref)

This commit is contained in:
Matthias Krüger 2020-03-04 15:16:27 +01:00
parent 569676b9b0
commit 38f5db7268

View File

@ -296,7 +296,7 @@ impl<'a, I: Iterator<Item = Event<'a>>> Iterator for CodeBlocks<'_, 'a, I> {
""
}
)),
playground_button.as_ref().map(String::as_str),
playground_button.as_deref(),
Some((s1.as_str(), s2)),
));
Some(Event::Html(s.into()))
@ -315,7 +315,7 @@ impl<'a, I: Iterator<Item = Event<'a>>> Iterator for CodeBlocks<'_, 'a, I> {
""
}
)),
playground_button.as_ref().map(String::as_str),
playground_button.as_deref(),
None,
));
Some(Event::Html(s.into()))