diff options
| author | Josh Triplett <josh@joshtriplett.org> | 2022-07-06 00:52:53 -0700 |
|---|---|---|
| committer | Josh Triplett <josh@joshtriplett.org> | 2022-07-06 02:03:56 -0700 |
| commit | b7230d4f44e974c6639980a2e44e8d7523b6c90c (patch) | |
| tree | bf10a79164fc5ae3b82b4f54b61ceabd09c75fa2 /clippy_utils/src/source.rs | |
| parent | ebff7206bcc4c740be9016dc7d2e10cf421463f9 (diff) | |
| download | rust-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.rs | 2 |
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. |
