mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
misc: clippy: add semicolon_if_nothing_returned
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com
This commit is contained in:
committed by
Rob Bradford
parent
ea4f07d3bf
commit
b4c62bf159
@@ -122,7 +122,7 @@ pub fn build_serial(disk_path: &Path) -> Vec<u8> {
|
||||
// This will also zero out any leftover bytes.
|
||||
let disk_id = m.as_bytes();
|
||||
let bytes_to_copy = cmp::min(disk_id.len(), VIRTIO_BLK_ID_BYTES as usize);
|
||||
default_serial[..bytes_to_copy].clone_from_slice(&disk_id[..bytes_to_copy])
|
||||
default_serial[..bytes_to_copy].clone_from_slice(&disk_id[..bytes_to_copy]);
|
||||
}
|
||||
}
|
||||
default_serial
|
||||
@@ -563,7 +563,7 @@ impl Request {
|
||||
aligned_operation.aligned_ptr as *const u8,
|
||||
aligned_operation.origin_ptr as *mut u8,
|
||||
aligned_operation.size,
|
||||
)
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -574,7 +574,7 @@ impl Request {
|
||||
dealloc(
|
||||
aligned_operation.aligned_ptr as *mut u8,
|
||||
aligned_operation.layout,
|
||||
)
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -582,7 +582,7 @@ impl Request {
|
||||
}
|
||||
|
||||
pub fn set_writeback(&mut self, writeback: bool) {
|
||||
self.writeback = writeback
|
||||
self.writeback = writeback;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ impl AsyncIo for RawFileAsync {
|
||||
.build()
|
||||
.user_data(user_data),
|
||||
)
|
||||
.map_err(|_| AsyncIoError::ReadVectored(Error::other("Submission queue is full")))?
|
||||
.map_err(|_| AsyncIoError::ReadVectored(Error::other("Submission queue is full")))?;
|
||||
};
|
||||
|
||||
// Update the submission queue and submit new operations to the
|
||||
@@ -125,7 +125,7 @@ impl AsyncIo for RawFileAsync {
|
||||
.build()
|
||||
.user_data(user_data),
|
||||
)
|
||||
.map_err(|_| AsyncIoError::WriteVectored(Error::other("Submission queue is full")))?
|
||||
.map_err(|_| AsyncIoError::WriteVectored(Error::other("Submission queue is full")))?;
|
||||
};
|
||||
|
||||
// Update the submission queue and submit new operations to the
|
||||
@@ -147,7 +147,7 @@ impl AsyncIo for RawFileAsync {
|
||||
.build()
|
||||
.user_data(user_data),
|
||||
)
|
||||
.map_err(|_| AsyncIoError::Fsync(Error::other("Submission queue is full")))?
|
||||
.map_err(|_| AsyncIoError::Fsync(Error::other("Submission queue is full")))?;
|
||||
};
|
||||
|
||||
// Update the submission queue and submit new operations to the
|
||||
@@ -199,7 +199,7 @@ impl AsyncIo for RawFileAsync {
|
||||
)
|
||||
.map_err(|_| {
|
||||
AsyncIoError::ReadVectored(Error::other("Submission queue is full"))
|
||||
})?
|
||||
})?;
|
||||
};
|
||||
submitted = true;
|
||||
}
|
||||
@@ -219,7 +219,7 @@ impl AsyncIo for RawFileAsync {
|
||||
)
|
||||
.map_err(|_| {
|
||||
AsyncIoError::WriteVectored(Error::other("Submission queue is full"))
|
||||
})?
|
||||
})?;
|
||||
};
|
||||
submitted = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user