Skip to content

Commit 1121ff7

Browse files
jackh726hkBst
andauthored
Use String::new() instead of "".to_string()
Co-authored-by: Marijn Schouten <hkBst@users.noreply.github.com>
1 parent 09dca95 commit 1121ff7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_hir_typeck/src/fn_ctxt/suggestions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2968,7 +2968,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
29682968
let r_paren = self.tcx.sess.source_map().end_point(expr.span);
29692969
return Some((
29702970
vec![
2971-
(box_new.span.to(l_paren), "".to_string()),
2971+
(box_new.span.to(l_paren), String::new()),
29722972
(r_paren, "".to_string()),
29732973
],
29742974
"consider removing the Box".to_string(),

0 commit comments

Comments
 (0)