diff --git a/boot/yboot-proto/src/lib.rs b/boot/yboot-proto/src/lib.rs index 6458dd35..311c4133 100644 --- a/boot/yboot-proto/src/lib.rs +++ b/boot/yboot-proto/src/lib.rs @@ -1,3 +1,4 @@ +#![allow(unused)] #![no_std] use bytemuck::{Pod, Zeroable}; diff --git a/boot/yboot/src/elf.rs b/boot/yboot/src/elf.rs index 804fb135..4b86b6b6 100644 --- a/boot/yboot/src/elf.rs +++ b/boot/yboot/src/elf.rs @@ -16,6 +16,7 @@ use crate::elf::types::{PT_LOAD, SHF_ALLOC, SHF_WRITE, SHT_PROGBITS}; use self::types::{Ehdr, Phdr, Shdr}; +#[allow(unused)] mod types { use bytemuck::{Pod, Zeroable}; diff --git a/kernel/driver/virtio/core/src/transport/mod.rs b/kernel/driver/virtio/core/src/transport/mod.rs index e0ea5969..4d4029df 100644 --- a/kernel/driver/virtio/core/src/transport/mod.rs +++ b/kernel/driver/virtio/core/src/transport/mod.rs @@ -20,7 +20,7 @@ pub trait Transport: Send { fn notify_cfg(&self) -> &[WriteOnly]; fn notify_off_mul(&self) -> usize; fn supports_msix(&self) -> bool; - fn device_cfg(&self) -> Option<&DeviceMemoryIo<[u8]>>; + fn device_cfg(&self) -> Option<&DeviceMemoryIo<'_, [u8]>>; fn read_interrupt_status(&self) -> (bool, bool); fn read_device_features(&mut self) -> u64 { diff --git a/userspace/graphics/term/src/state.rs b/userspace/graphics/term/src/state.rs index 52061768..4cd0a731 100644 --- a/userspace/graphics/term/src/state.rs +++ b/userspace/graphics/term/src/state.rs @@ -525,7 +525,7 @@ impl State { if vt_color == 9 { self.attributes.bg = self.default_attributes.bg; } else { - self.attributes.bg = Color::from_escape(&*CONFIG, false, vt_color) + self.attributes.bg = Color::from_escape(&CONFIG, false, vt_color) .unwrap_or(self.default_attributes.bg); } } diff --git a/userspace/lib/hclient/src/connection/auto.rs b/userspace/lib/hclient/src/connection/auto.rs index 7acba3ed..a6b29736 100644 --- a/userspace/lib/hclient/src/connection/auto.rs +++ b/userspace/lib/hclient/src/connection/auto.rs @@ -15,7 +15,7 @@ pub struct AutoConnector { pub enum AutoConnection { Tcp(TcpStream), - Tls(TlsConnection), + Tls(Box), } impl AutoConnector { @@ -48,6 +48,7 @@ impl HttpConnector for AutoConnector { "https" => self .tls .connect(remote, scheme, server_name, timeout, options) + .map(Box::new) .map(AutoConnection::Tls), _ => unreachable!(), } diff --git a/userspace/tools/shell/src/main.rs b/userspace/tools/shell/src/main.rs index 1390ac32..997e9dcb 100644 --- a/userspace/tools/shell/src/main.rs +++ b/userspace/tools/shell/src/main.rs @@ -141,20 +141,16 @@ fn run(mut input: ShellInput, env: &mut Environment) -> Result<(), Error> { continue; } }; - let old_termios = match &mut input { - ShellInput::Interactive(interactive) => { - let new = TerminalOptionsImpl::normal(); - Some(interactive.set_options(new)?) - } - _ => None, + let old_termios = if let ShellInput::Interactive(interactive) = &mut input { + let new = TerminalOptionsImpl::normal(); + Some(interactive.set_options(new)?) + } else { + None }; let (outcome, exit) = command::eval::evaluate(&expr, env); - match &mut input { - ShellInput::Interactive(interactive) => { - interactive.set_options(old_termios.unwrap()).ok(); - } - _ => (), + if let ShellInput::Interactive(interactive) = &mut input { + interactive.set_options(old_termios.unwrap()).ok(); } command_text.clear();