Skip to content

Commit 7b1ebf1

Browse files
committed
remove unnecessary format! calls in favour of .to_string calls
1 parent 2e22102 commit 7b1ebf1

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
757757
(
758758
val.span.shrink_to_hi().with_hi(index.span.lo() + offset), //remove the
759759
//leading &
760-
format!(".insert("),
760+
".insert(".to_string(),
761761
),
762762
(
763763
index.span.shrink_to_hi().with_hi(rv.span.lo()),
@@ -778,7 +778,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
778778
(
779779
val.span.shrink_to_hi().with_hi(index.span.lo() + offset), //remove the
780780
//leading &
781-
format!(".entry("),
781+
".entry(".to_string(),
782782
),
783783
(
784784
index.span.shrink_to_hi().with_hi(rv.span.lo()),
@@ -826,7 +826,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
826826
(val.span.shrink_to_lo(), "if let Some(val) = ".to_string()),
827827
(
828828
val.span.shrink_to_hi().with_hi(index.span.lo()),
829-
format!(".get_mut("),
829+
".get_mut(".to_string(),
830830
),
831831
(
832832
index.span.shrink_to_hi().with_hi(receiver.span.hi()),

0 commit comments

Comments
 (0)