maint: fix warnings
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
#![allow(unused)]
|
||||
#![no_std]
|
||||
|
||||
use bytemuck::{Pod, Zeroable};
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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!(),
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user