mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
style: simplify string interpolation
This commit is contained in:
parent
b32f181f47
commit
7c34eb3880
43 changed files with 71 additions and 78 deletions
|
@ -43,7 +43,7 @@ fn find_and_interpret(db: &RootDatabase, position: FilePosition) -> Option<Strin
|
|||
let path = path.as_deref().unwrap_or("<unknown file>");
|
||||
match db.line_index(file_id).try_line_col(text_range.start()) {
|
||||
Some(line_col) => format!("file://{path}#{}:{}", line_col.line + 1, line_col.col),
|
||||
None => format!("file://{path} range {:?}", text_range),
|
||||
None => format!("file://{path} range {text_range:?}"),
|
||||
}
|
||||
};
|
||||
Some(def.eval(db, span_formatter))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue