mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
minor: Make use of some new SmolStr
improvements
This commit is contained in:
parent
0bdbf497b6
commit
83591268ab
18 changed files with 80 additions and 61 deletions
|
@ -17,7 +17,7 @@ use ide_db::{
|
|||
imports::import_assets::LocatedImport,
|
||||
RootDatabase, SnippetCap, SymbolKind,
|
||||
};
|
||||
use syntax::{AstNode, SmolStr, SyntaxKind, TextRange};
|
||||
use syntax::{format_smolstr, AstNode, SmolStr, SyntaxKind, TextRange};
|
||||
use text_edit::TextEdit;
|
||||
|
||||
use crate::{
|
||||
|
@ -202,7 +202,7 @@ fn field_with_receiver(
|
|||
) -> SmolStr {
|
||||
receiver.map_or_else(
|
||||
|| field_name.into(),
|
||||
|receiver| format!("{}.{field_name}", receiver.display(db)).into(),
|
||||
|receiver| format_smolstr!("{}.{field_name}", receiver.display(db)),
|
||||
)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue