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:
@@ -57,7 +57,7 @@ struct ConsoleEpollHandler {
|
||||
mem: GuestMemoryMmap,
|
||||
interrupt_cb: Arc<VirtioInterrupt>,
|
||||
in_buffer: Arc<Mutex<VecDeque<u8>>>,
|
||||
out: Box<io::Write + Send>,
|
||||
out: Box<dyn io::Write + Send>,
|
||||
input_queue_evt: EventFd,
|
||||
output_queue_evt: EventFd,
|
||||
input_evt: EventFd,
|
||||
@@ -321,13 +321,13 @@ pub struct Console {
|
||||
acked_features: u64,
|
||||
config: Arc<Mutex<VirtioConsoleConfig>>,
|
||||
input: Arc<ConsoleInput>,
|
||||
out: Option<Box<io::Write + Send>>,
|
||||
out: Option<Box<dyn io::Write + Send>>,
|
||||
}
|
||||
|
||||
impl Console {
|
||||
/// Create a new virtio console device that gets random data from /dev/urandom.
|
||||
pub fn new(
|
||||
out: Option<Box<io::Write + Send>>,
|
||||
out: Option<Box<dyn io::Write + Send>>,
|
||||
cols: u16,
|
||||
rows: u16,
|
||||
) -> io::Result<(Console, Arc<ConsoleInput>)> {
|
||||
|
||||
Reference in New Issue
Block a user