Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clippy fix #199

Merged
merged 2 commits into from
Dec 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion alioth/src/board/x86_64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,6 @@ pub const SEV_DESC_TYPE_CPUID: u32 = 3;

#[derive(Debug, FromBytes, IntoBytes, Immutable)]
#[repr(C)]

struct SevMetadataDesc {
base: u32,
len: u32,
Expand Down
2 changes: 1 addition & 1 deletion alioth/src/device/fw_cfg/fw_cfg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ struct FwCfgContentAccess<'a> {
offset: u32,
}

impl<'a> Read for FwCfgContentAccess<'a> {
impl Read for FwCfgContentAccess<'_> {
fn read(&mut self, buf: &mut [u8]) -> Result<usize> {
match self.content {
FwCfgContent::File(offset, f) => {
Expand Down
4 changes: 2 additions & 2 deletions alioth/src/virtio/queue/split.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ pub struct SplitQueue<'q, 'm> {

type DescIov = (Vec<(u64, u64)>, Vec<(u64, u64)>);

impl<'q, 'm> SplitQueue<'q, 'm> {
impl<'m> SplitQueue<'_, 'm> {
pub fn avail_index(&self) -> u16 {
unsafe { &*self.avail_hdr }.idx
}
Expand Down Expand Up @@ -245,7 +245,7 @@ impl<'q, 'm> SplitQueue<'q, 'm> {
}
}

impl<'q, 'm> VirtQueue<'m> for SplitQueue<'q, 'm> {
impl<'m> VirtQueue<'m> for SplitQueue<'_, 'm> {
fn reg(&self) -> &Queue {
self.reg
}
Expand Down
4 changes: 2 additions & 2 deletions alioth/src/virtio/worker/io_uring.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ where
Ok(())
}

impl<'a, 'm, Q, S> ActiveIoUring<'a, 'm, Q, S>
impl<'m, Q, S> ActiveIoUring<'_, 'm, Q, S>
where
Q: VirtQueue<'m>,
S: IrqSender,
Expand Down Expand Up @@ -263,7 +263,7 @@ where
}
}

impl<'a, 'm, Q, S, D> ActiveBackend<D> for ActiveIoUring<'a, 'm, Q, S>
impl<'m, Q, S, D> ActiveBackend<D> for ActiveIoUring<'_, 'm, Q, S>
where
D: VirtioIoUring,
Q: VirtQueue<'m>,
Expand Down
2 changes: 1 addition & 1 deletion alioth/src/virtio/worker/mio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ pub struct ActiveMio<'a, 'm, Q, S> {
pub mem: &'m Ram,
}

impl<'a, 'm, Q, S, D> ActiveBackend<D> for ActiveMio<'a, 'm, Q, S>
impl<'m, Q, S, D> ActiveBackend<D> for ActiveMio<'_, 'm, Q, S>
where
D: VirtioMio,
Q: VirtQueue<'m>,
Expand Down
10 changes: 5 additions & 5 deletions serde-aco/src/de.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pub struct Deserializer<'s, 'o> {
key: &'s str,
}

impl<'s, 'o, 'a> de::Deserializer<'s> for &'a mut Deserializer<'s, 'o> {
impl<'s> de::Deserializer<'s> for &mut Deserializer<'s, '_> {
type Error = Error;

fn deserialize_any<V>(self, _visitor: V) -> Result<V::Value>
Expand Down Expand Up @@ -431,7 +431,7 @@ impl<'a, 's, 'o> CommaSeparated<'a, 's, 'o> {
}
}

impl<'a, 's, 'o> SeqAccess<'s> for CommaSeparated<'a, 's, 'o> {
impl<'s> SeqAccess<'s> for CommaSeparated<'_, 's, '_> {
type Error = Error;
fn next_element_seed<T>(&mut self, seed: T) -> Result<Option<T::Value>>
where
Expand All @@ -444,7 +444,7 @@ impl<'a, 's, 'o> SeqAccess<'s> for CommaSeparated<'a, 's, 'o> {
}
}

impl<'a, 's, 'o> MapAccess<'s> for CommaSeparated<'a, 's, 'o> {
impl<'s> MapAccess<'s> for CommaSeparated<'_, 's, '_> {
type Error = Error;

fn next_key_seed<K>(&mut self, seed: K) -> Result<Option<K::Value>>
Expand Down Expand Up @@ -487,7 +487,7 @@ impl<'a, 's, 'o> Enum<'a, 's, 'o> {
}
}

impl<'a, 's, 'o> EnumAccess<'s> for Enum<'a, 's, 'o> {
impl<'s> EnumAccess<'s> for Enum<'_, 's, '_> {
type Error = Error;
type Variant = Self;

Expand All @@ -500,7 +500,7 @@ impl<'a, 's, 'o> EnumAccess<'s> for Enum<'a, 's, 'o> {
}
}

impl<'a, 's, 'o> VariantAccess<'s> for Enum<'a, 's, 'o> {
impl<'s> VariantAccess<'s> for Enum<'_, 's, '_> {
type Error = Error;

fn unit_variant(self) -> Result<()> {
Expand Down
Loading