mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-24 09:53:24 +00:00
Fix multiple issues pointed out by the new compiler
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
5f2bd9d0ac
commit
9e4257b655
@ -162,9 +162,9 @@ impl<D, E> EtherIface<D, E> {
|
||||
}
|
||||
|
||||
// Ignore the ARP packet if we do not own the target address.
|
||||
if !iface_cx
|
||||
if iface_cx
|
||||
.ipv4_addr()
|
||||
.is_some_and(|addr| addr == *target_protocol_addr)
|
||||
.is_none_or(|addr| addr != *target_protocol_addr)
|
||||
{
|
||||
return None;
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ impl<'a, E> PollContext<'a, E> {
|
||||
pub(super) trait FnHelper<A, B, C, O>: FnMut(A, B, C) -> O {}
|
||||
impl<A, B, C, O, F> FnHelper<A, B, C, O> for F where F: FnMut(A, B, C) -> O {}
|
||||
|
||||
impl<'a, E> PollContext<'a, E> {
|
||||
impl<E> PollContext<'_, E> {
|
||||
pub(super) fn poll_ingress<D, P, Q>(
|
||||
&mut self,
|
||||
device: &mut D,
|
||||
@ -280,7 +280,7 @@ impl<'a, E> PollContext<'a, E> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, E> PollContext<'a, E> {
|
||||
impl<E> PollContext<'_, E> {
|
||||
pub(super) fn poll_egress<D, Q>(&mut self, device: &mut D, mut dispatch_phy: Q)
|
||||
where
|
||||
D: Device + ?Sized,
|
||||
|
Reference in New Issue
Block a user