about summary refs log tree commit diff
path: root/clippy_utils/src/source.rs
diff options
context:
space:
mode:
authorJosh Triplett <josh@joshtriplett.org>2022-07-06 00:52:53 -0700
committerJosh Triplett <josh@joshtriplett.org>2022-07-06 02:03:56 -0700
commitb7230d4f44e974c6639980a2e44e8d7523b6c90c (patch)
treebf10a79164fc5ae3b82b4f54b61ceabd09c75fa2 /clippy_utils/src/source.rs
parentebff7206bcc4c740be9016dc7d2e10cf421463f9 (diff)
downloadrust-b7230d4f44e974c6639980a2e44e8d7523b6c90c.tar.gz
rust-b7230d4f44e974c6639980a2e44e8d7523b6c90c.zip
Dogfood fixes to use `bool::then_some`
Diffstat (limited to 'clippy_utils/src/source.rs')
-rw-r--r--clippy_utils/src/source.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/clippy_utils/src/source.rs b/clippy_utils/src/source.rs
index f88a92fb11c..1197fe914de 100644
--- a/clippy_utils/src/source.rs
+++ b/clippy_utils/src/source.rs
@@ -353,7 +353,7 @@ pub fn snippet_with_context<'a>(
 /// span containing `m!(0)`.
 pub fn walk_span_to_context(span: Span, outer: SyntaxContext) -> Option<Span> {
     let outer_span = hygiene::walk_chain(span, outer);
-    (outer_span.ctxt() == outer).then(|| outer_span)
+    (outer_span.ctxt() == outer).then_some(outer_span)
 }
 
 /// Removes block comments from the given `Vec` of lines.