ide-diagnostics: Fix warnings about clippy str_to_string rule

This commit is contained in:
Tetsuharu Ohzeki 2024-02-10 00:35:55 +09:00
parent eba1b13295
commit d00f1c1b16
22 changed files with 36 additions and 36 deletions

View file

@ -170,7 +170,7 @@ fn make_ty(ty: &hir::Type, db: &dyn HirDatabase, module: hir::Module) -> ast::Ty
let ty_str = match ty.as_adt() {
Some(adt) => adt.name(db).display(db.upcast()).to_string(),
None => {
ty.display_source_code(db, module.into(), false).ok().unwrap_or_else(|| "_".to_string())
ty.display_source_code(db, module.into(), false).ok().unwrap_or_else(|| "_".to_owned())
}
};