maint: fix warnings

This commit is contained in:
2025-07-19 09:47:20 +03:00
parent dd43135b64
commit 6b0d5def50
6 changed files with 13 additions and 14 deletions
+1
View File
@@ -1,3 +1,4 @@
#![allow(unused)]
#![no_std]
use bytemuck::{Pod, Zeroable};
+1
View File
@@ -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};
@@ -20,7 +20,7 @@ pub trait Transport: Send {
fn notify_cfg(&self) -> &[WriteOnly<u16>];
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 {
+1 -1
View File
@@ -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);
}
}
+2 -1
View File
@@ -15,7 +15,7 @@ pub struct AutoConnector {
pub enum AutoConnection {
Tcp(TcpStream),
Tls(TlsConnection),
Tls(Box<TlsConnection>),
}
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!(),
}
+7 -11
View File
@@ -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();