Skip to content

Commit 22522a6

Browse files
committed
refactor: remove unnecessary mutability
1 parent 7cf7e5d commit 22522a6

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/cargo/core/compiler/mod.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ where
671671
// TODO: do we really need this as a separate function?
672672
// Maybe we should reorganize `rustc` fn to make it more traceable and readable.
673673
fn prepare_rustc(
674-
cx: &mut Context<'_, '_>,
674+
cx: &Context<'_, '_>,
675675
crate_types: &[CrateType],
676676
unit: &Unit,
677677
) -> CargoResult<ProcessBuilder> {
@@ -941,7 +941,7 @@ fn add_error_format_and_color(cx: &Context<'_, '_>, cmd: &mut ProcessBuilder) {
941941

942942
/// Adds essential rustc flags and environment variables to the command to execute.
943943
fn build_base_args(
944-
cx: &mut Context<'_, '_>,
944+
cx: &Context<'_, '_>,
945945
cmd: &mut ProcessBuilder,
946946
unit: &Unit,
947947
crate_types: &[CrateType],
@@ -1240,11 +1240,7 @@ fn lto_args(cx: &Context<'_, '_>, unit: &Unit) -> Vec<OsString> {
12401240
///
12411241
/// [`-L`]: https://doc.rust-lang.org/nightly/rustc/command-line-arguments.html#-l-add-a-directory-to-the-library-search-path
12421242
/// [`--extern`]: https://doc.rust-lang.org/nightly/rustc/command-line-arguments.html#--extern-specify-where-an-external-library-is-located
1243-
fn build_deps_args(
1244-
cmd: &mut ProcessBuilder,
1245-
cx: &mut Context<'_, '_>,
1246-
unit: &Unit,
1247-
) -> CargoResult<()> {
1243+
fn build_deps_args(cmd: &mut ProcessBuilder, cx: &Context<'_, '_>, unit: &Unit) -> CargoResult<()> {
12481244
let bcx = cx.bcx;
12491245
cmd.arg("-L").arg(&{
12501246
let mut deps = OsString::from("dependency=");

0 commit comments

Comments
 (0)