Skip to content

Commit 6fe9aa9

Browse files
committed
kargs: Drop unnecessary mut
By passing ownership of the vector here we don't need to make it `mut`able. Signed-off-by: Colin Walters <[email protected]>
1 parent fd80292 commit 6fe9aa9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/src/kargs.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ pub(crate) fn get_kargs(
7272

7373
// Get the kargs in kargs.d of the booted system
7474
let root = &cap_std::fs::Dir::open_ambient_dir("/", cap_std::ambient_authority())?;
75-
let mut existing_kargs: Vec<String> = get_kargs_in_root(root, sys_arch)?;
75+
let existing_kargs: Vec<String> = get_kargs_in_root(root, sys_arch)?;
7676

7777
// Get the kargs in kargs.d of the pending image
7878
let mut remote_kargs: Vec<String> = vec![];
@@ -83,7 +83,7 @@ pub(crate) fn get_kargs(
8383
.expect("downcast");
8484
if !fetched_tree.query_exists(cancellable) {
8585
// if the kargs.d directory does not exist in the fetched image, return the existing kargs
86-
kargs.append(&mut existing_kargs);
86+
kargs.extend(existing_kargs);
8787
return Ok(kargs);
8888
}
8989
let queryattrs = "standard::name,standard::type";

0 commit comments

Comments
 (0)