mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-22 20:53:21 +00:00
Avoid another &Lrc<..>
in a return value.
This commit is contained in:
parent
d0507302fc
commit
121d3ab89e
1 changed files with 1 additions and 0 deletions
|
@ -287,6 +287,7 @@ impl SourceFileRange {
|
|||
self.sf
|
||||
.src
|
||||
.as_ref()
|
||||
.map(|src| src.as_str())
|
||||
.or_else(|| self.sf.external_src.get().and_then(|src| src.get_source()))
|
||||
.and_then(|x| x.get(self.range.clone()))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue