fix clippy::toplevel_ref_arg and ::manual_map
This commit is contained in:
parent
e6e956dade
commit
543f8bc38c
12 changed files with 42 additions and 70 deletions
|
@ -906,10 +906,8 @@ impl SourceMap {
|
|||
|
||||
let snippet = if let Some(ref src) = local_begin.sf.src {
|
||||
Some(&src[start_index..])
|
||||
} else if let Some(src) = src.get_source() {
|
||||
Some(&src[start_index..])
|
||||
} else {
|
||||
None
|
||||
src.get_source().map(|src| &src[start_index..])
|
||||
};
|
||||
|
||||
match snippet {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue