Avoid another &Lrc<..> in a return value.

This commit is contained in:
Nicholas Nethercote 2024-10-07 13:25:38 +11:00
parent d0507302fc
commit 121d3ab89e

View file

@ -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()))
}