From 74c1e8328f7033a13f3908b9409358423536037c Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 11 Jul 2024 09:15:40 -0400 Subject: [PATCH] kargs: Use type inference No need for explicit types in most of these places. Signed-off-by: Colin Walters --- lib/src/kargs.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/src/kargs.rs b/lib/src/kargs.rs index eb87b05a7..8840dfbef 100644 --- a/lib/src/kargs.rs +++ b/lib/src/kargs.rs @@ -107,7 +107,7 @@ pub(crate) fn get_kargs( ) -> Result> { let cancellable = gio::Cancellable::NONE; let repo = &sysroot.repo(); - let mut kargs: Vec = vec![]; + let mut kargs = vec![]; let sys_arch = std::env::consts::ARCH; // Get the kargs used for the merge in the bootloader config @@ -120,7 +120,7 @@ pub(crate) fn get_kargs( // Get the kargs in kargs.d of the merge let merge_root = &crate::utils::deployment_fd(sysroot, merge_deployment)?; - let existing_kargs: Vec = get_kargs_in_root(merge_root, sys_arch)?; + let existing_kargs = get_kargs_in_root(merge_root, sys_arch)?; // Get the kargs in kargs.d of the pending image let (fetched_tree, _) = repo.read_commit(fetched.ostree_commit.as_str(), cancellable)?; @@ -139,16 +139,16 @@ pub(crate) fn get_kargs( let remote_kargs = get_kargs_from_ostree(repo, &fetched_tree, sys_arch)?; // get the diff between the existing and remote kargs - let mut added_kargs: Vec = remote_kargs + let mut added_kargs = remote_kargs .clone() .into_iter() .filter(|item| !existing_kargs.contains(item)) - .collect(); - let removed_kargs: Vec = existing_kargs + .collect::>(); + let removed_kargs = existing_kargs .clone() .into_iter() .filter(|item| !remote_kargs.contains(item)) - .collect(); + .collect::>(); tracing::debug!( "kargs: added={:?} removed={:?}",