Skip to content

Commit

Permalink
style: fix clippy errors from 28-11-2024
Browse files Browse the repository at this point in the history
  • Loading branch information
n0toose committed Nov 28, 2024
1 parent d4bc7da commit e2dbc3e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/arch/x86_64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pub fn detect_freq_from_cpuid(

let has_invariant_tsc = cpuid
.get_advanced_power_mgmt_info()
.map_or(false, |apm_info| apm_info.has_invariant_tsc());
.is_some_and(|apm_info| apm_info.has_invariant_tsc());
if !has_invariant_tsc {
warn!("TSC frequency varies with speed-stepping")
}
Expand Down
2 changes: 1 addition & 1 deletion src/hypercall.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ pub fn copy_argv(path: &OsStr, argv: &[String], syscmdval: &CmdvalParams, mem: &

// Copy the application arguments into the vm memory
for (counter, argument) in argv.iter().enumerate() {
let len = argument.as_bytes().len();
let len = argument.len();
let arg_dest = unsafe {
mem.slice_at_mut(arg_addrs[counter], len + 1)
.expect("Systemcall parameters for Cmdval are invalid")
Expand Down
2 changes: 1 addition & 1 deletion src/virtqueue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ pub struct AvailIter<'a> {
queue_size: u16,
}

impl<'a> Iterator for AvailIter<'a> {
impl Iterator for AvailIter<'_> {
type Item = u16;

fn next(&mut self) -> Option<Self::Item> {
Expand Down
2 changes: 1 addition & 1 deletion uhyve-interface/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ pub enum Hypercall<'a> {
/// Write a buffer to the terminal.
SerialWriteBuffer(&'a SerialWriteBufferParams),
}
impl<'a> Hypercall<'a> {
impl Hypercall<'_> {
// TODO: Remove this in the next major version
/// Get a hypercall's port address.
pub fn port(self) -> u16 {
Expand Down

0 comments on commit e2dbc3e

Please sign in to comment.