diff options
| author | bors <bors@rust-lang.org> | 2018-07-30 06:29:39 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-07-30 06:29:39 +0000 |
| commit | 7bbcd005b30582d07f1a39dcf50f77b54e055828 (patch) | |
| tree | ee814e901b90440bc7b76ab13bdbb7468b3b17de /src/librustdoc/html | |
| parent | a3f519df09bf40d09c1a111599b8f115f11fbb49 (diff) | |
| parent | 421b2ba347a3a1afa41b91f4254f238c790fd73b (diff) | |
| download | rust-7bbcd005b30582d07f1a39dcf50f77b54e055828.tar.gz rust-7bbcd005b30582d07f1a39dcf50f77b54e055828.zip | |
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()`.
Diffstat (limited to 'src/librustdoc/html')
| -rw-r--r-- | src/librustdoc/html/render.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs index a1ab66ea81c..24a9bf416e4 100644 --- a/src/librustdoc/html/render.rs +++ b/src/librustdoc/html/render.rs @@ -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() { |
