mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 05:45:12 +00:00
ide-assists: Fix warnings about clippy str_to_string
rule
This commit is contained in:
parent
b89a4038c9
commit
80e684254d
18 changed files with 25 additions and 25 deletions
|
@ -244,7 +244,7 @@ fn make_function_name(semantics_scope: &hir::SemanticsScope<'_>) -> ast::NameRef
|
|||
|
||||
let default_name = "fun_name";
|
||||
|
||||
let mut name = default_name.to_string();
|
||||
let mut name = default_name.to_owned();
|
||||
let mut counter = 0;
|
||||
while names_in_scope.contains(&name) {
|
||||
counter += 1;
|
||||
|
@ -1949,7 +1949,7 @@ fn with_tail_expr(block: ast::BlockExpr, tail_expr: ast::Expr) -> ast::BlockExpr
|
|||
}
|
||||
|
||||
fn format_type(ty: &hir::Type, ctx: &AssistContext<'_>, module: hir::Module) -> String {
|
||||
ty.display_source_code(ctx.db(), module.into(), true).ok().unwrap_or_else(|| "_".to_string())
|
||||
ty.display_source_code(ctx.db(), module.into(), true).ok().unwrap_or_else(|| "_".to_owned())
|
||||
}
|
||||
|
||||
fn make_ty(ty: &hir::Type, ctx: &AssistContext<'_>, module: hir::Module) -> ast::Type {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue