Skip to content

Commit 38f5db7

Browse files
committed
Use .as_deref() instead of .as_ref().map(Deref::deref) (clippy::option_as_ref_deref)
1 parent 569676b commit 38f5db7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/librustdoc/html/markdown.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ impl<'a, I: Iterator<Item = Event<'a>>> Iterator for CodeBlocks<'_, 'a, I> {
296296
""
297297
}
298298
)),
299-
playground_button.as_ref().map(String::as_str),
299+
playground_button.as_deref(),
300300
Some((s1.as_str(), s2)),
301301
));
302302
Some(Event::Html(s.into()))
@@ -315,7 +315,7 @@ impl<'a, I: Iterator<Item = Event<'a>>> Iterator for CodeBlocks<'_, 'a, I> {
315315
""
316316
}
317317
)),
318-
playground_button.as_ref().map(String::as_str),
318+
playground_button.as_deref(),
319319
None,
320320
));
321321
Some(Event::Html(s.into()))

0 commit comments

Comments
 (0)