mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-28 19:54:35 +00:00
kata-sys-util: Fix unnecessary_cast warnings
As we bumped the rust toolchain to 1.66.0, some new warnings have been raised due to unnecessary_cast. Let's fix them all here. For more info about the warnings, please, take a look at: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
parent
c1a8d89a72
commit
668e652401
@ -592,7 +592,7 @@ fn compact_lowerdir_option(opts: &[String]) -> (Option<PathBuf>, Vec<String>) {
|
||||
}
|
||||
};
|
||||
|
||||
let idx = idx as usize;
|
||||
let idx = idx;
|
||||
let common_dir = match get_longest_common_prefix(&lower_opts) {
|
||||
None => return (None, n_opts),
|
||||
Some(v) => {
|
||||
@ -620,7 +620,7 @@ fn compact_lowerdir_option(opts: &[String]) -> (Option<PathBuf>, Vec<String>) {
|
||||
.iter()
|
||||
.map(|c| c.replace(&common_prefix, ""))
|
||||
.collect();
|
||||
n_opts[idx as usize] = format!("lowerdir={}", lower.join(":"));
|
||||
n_opts[idx] = format!("lowerdir={}", lower.join(":"));
|
||||
|
||||
(Some(common_dir), n_opts)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user