mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
Inline all format arguments where possible
This makes code more readale and concise, moving all format arguments like `format!("{}", foo)` into the more compact `format!("{foo}")` form. The change was automatically created with, so there are far less change of an accidental typo. ``` cargo clippy --fix -- -A clippy::all -W clippy::uninlined_format_args ```
This commit is contained in:
parent
1927c2e1d8
commit
e16c76e3c3
180 changed files with 487 additions and 501 deletions
|
@ -52,8 +52,8 @@ pub(crate) fn status(db: &RootDatabase, file_id: Option<FileId>) -> String {
|
|||
let crate_graph = db.crate_graph();
|
||||
for krate in crates {
|
||||
let display_crate = |krate: CrateId| match &crate_graph[krate].display_name {
|
||||
Some(it) => format!("{}({:?})", it, krate),
|
||||
None => format!("{:?}", krate),
|
||||
Some(it) => format!("{it}({krate:?})"),
|
||||
None => format!("{krate:?}"),
|
||||
};
|
||||
format_to!(buf, "Crate: {}\n", display_crate(krate));
|
||||
let deps = crate_graph[krate]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue