Skip to content

Commit aad48f7

Browse files
committed
replace format!("") with String::new()
use array explicitly instead of vec for const content (even if optimizer smart enought to remove allocation)
1 parent 1af55d1 commit aad48f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_typeck/src/check/upvar.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1074,7 +1074,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
10741074
min_captures: Option<&ty::RootVariableMinCaptureList<'tcx>>,
10751075
) -> (Vec<MigrationDiagnosticInfo>, String) {
10761076
let Some(upvars) = self.tcx.upvars_mentioned(closure_def_id) else {
1077-
return (Vec::new(), format!(""));
1077+
return (Vec::new(), String::new());
10781078
};
10791079

10801080
let mut need_migrations = Vec::new();

0 commit comments

Comments
 (0)