mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
ide: Fix warnings about clippy str_to_string
rule
This commit is contained in:
parent
bb0de88f24
commit
8c2f301a41
17 changed files with 38 additions and 41 deletions
|
@ -15,8 +15,8 @@ use syntax::{algo::ancestors_at_offset, ast, AstNode, TextRange};
|
|||
// |===
|
||||
pub(crate) fn interpret_function(db: &RootDatabase, position: FilePosition) -> String {
|
||||
let start_time = Instant::now();
|
||||
let mut result = find_and_interpret(db, position)
|
||||
.unwrap_or_else(|| "Not inside a function body".to_string());
|
||||
let mut result =
|
||||
find_and_interpret(db, position).unwrap_or_else(|| "Not inside a function body".to_owned());
|
||||
let duration = Instant::now() - start_time;
|
||||
writeln!(result).unwrap();
|
||||
writeln!(result, "----------------------").unwrap();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue