mirror of
				https://github.com/kata-containers/kata-containers.git
				synced 2025-11-04 03:29:55 +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:
		@@ -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)
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user