Skip to content

Commit 121d3ab

Browse files
committed
Avoid another &Lrc<..> in a return value.
1 parent d050730 commit 121d3ab

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

clippy_utils/src/source.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ impl SourceFileRange {
287287
self.sf
288288
.src
289289
.as_ref()
290+
.map(|src| src.as_str())
290291
.or_else(|| self.sf.external_src.get().and_then(|src| src.get_source()))
291292
.and_then(|x| x.get(self.range.clone()))
292293
}

0 commit comments

Comments
 (0)