minor: Make use of some new SmolStr improvements

This commit is contained in:
Lukas Wirth 2024-01-17 13:43:18 +01:00
parent 0bdbf497b6
commit 83591268ab
18 changed files with 80 additions and 61 deletions

View file

@ -17,7 +17,7 @@ use ide_db::{
use stdx::never;
use syntax::{
ast::{self, HasName},
AstNode, SmolStr, SyntaxNode, TextRange,
format_smolstr, AstNode, SmolStr, SyntaxNode, TextRange,
};
/// `NavigationTarget` represents an element in the editor's UI which you can
@ -457,7 +457,7 @@ impl TryToNav for hir::Field {
|(FileRange { file_id, range: full_range }, focus_range)| {
NavigationTarget::from_syntax(
file_id,
format!("{}", self.index()).into(),
format_smolstr!("{}", self.index()),
focus_range,
full_range,
SymbolKind::Field,