1
Fork 0

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:
bors 2018-07-30 06:29:39 +00:00
commit 7bbcd005b3
42 changed files with 168 additions and 172 deletions

View file

@ -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() {