Auto merge of #52805 - ljedrz:format_str_literal, r=petrochenkov
Don't format!() string literals Prefer `to_string()` to `format!()` take 2, this time targetting string literals. In some cases (`&format!("...")` -> `"..."`) also removes allocations. Occurences of `format!("")` are changed to `String::new()`.
This commit is contained in:
commit
7bbcd005b3
42 changed files with 168 additions and 172 deletions
|
@ -2564,7 +2564,7 @@ fn short_stability(item: &clean::Item, cx: &Context, show_reason: bool) -> Vec<S
|
|||
text));
|
||||
}
|
||||
} else {
|
||||
stability.push(format!("<div class='stab unstable'>Experimental</div>"))
|
||||
stability.push("<div class='stab unstable'>Experimental</div>".to_string())
|
||||
}
|
||||
};
|
||||
} else if let Some(depr) = item.deprecation.as_ref() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue