diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2018-08-23 10:14:52 +0200 |
|---|---|---|
| committer | Matthias Krüger <matthias.krueger@famsik.de> | 2018-08-23 10:14:52 +0200 |
| commit | ede1f7d2a5a2f4038e3f3b2e953c44ee5ea06194 (patch) | |
| tree | cdaa95ead9a05ae228478333ccd15b88ac115ea7 /src/librustc/traits/error_reporting.rs | |
| parent | e73077e10603b3586828f2d3d067f804c2fc0a1f (diff) | |
| download | rust-ede1f7d2a5a2f4038e3f3b2e953c44ee5ea06194.tar.gz rust-ede1f7d2a5a2f4038e3f3b2e953c44ee5ea06194.zip | |
use String::new() instead of String::from(""), "".to_string(), "".to_owned() or "".into()
Diffstat (limited to 'src/librustc/traits/error_reporting.rs')
| -rw-r--r-- | src/librustc/traits/error_reporting.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librustc/traits/error_reporting.rs b/src/librustc/traits/error_reporting.rs index 0aa15a4ae0c..405b320f3fe 100644 --- a/src/librustc/traits/error_reporting.rs +++ b/src/librustc/traits/error_reporting.rs @@ -472,7 +472,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> { if len > 5 { format!("\nand {} others", len - 4) } else { - "".to_owned() + String::new() } )); } @@ -917,7 +917,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> { remove_refs); err.span_suggestion_short_with_applicability( - sp, &format_str, String::from(""), Applicability::MachineApplicable + sp, &format_str, String::new(), Applicability::MachineApplicable ); break; } @@ -1116,7 +1116,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> { .collect::<Vec<String>>() .join(", ")) } else { - "".to_owned() + String::new() }, ); err.span_suggestion_with_applicability( |
