mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
linters: Fix clippy issues
Latest clippy version complains about our existing code for the following reasons: - trait objects without an explicit `dyn` are deprecated - `...` range patterns are deprecated - lint `clippy::const_static_lifetime` has been renamed to `clippy::redundant_static_lifetimes` - unnecessary `unsafe` block - unneeded return statement All these issues have been fixed through this patch, and rustfmt has been run to cleanup potential formatting errors due to those changes. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
+2
-2
@@ -1087,10 +1087,10 @@ impl QcowFile {
|
||||
|
||||
let max_valid_cluster_offset = self.refcounts.max_valid_cluster_offset();
|
||||
if let Some(new_cluster) = self.raw_file.add_cluster_end(max_valid_cluster_offset)? {
|
||||
return Ok(new_cluster);
|
||||
Ok(new_cluster)
|
||||
} else {
|
||||
error!("No free clusters in get_new_cluster()");
|
||||
return Err(std::io::Error::from_raw_os_error(ENOSPC));
|
||||
Err(std::io::Error::from_raw_os_error(ENOSPC))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user