mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-26 02:43: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
@ -48,7 +48,7 @@ impl device::RxToken for RxToken {
|
||||
|
||||
pub struct TxToken<'a>(&'a mut dyn AnyNetworkDevice);
|
||||
|
||||
impl<'a> device::TxToken for TxToken<'a> {
|
||||
impl device::TxToken for TxToken<'_> {
|
||||
fn consume<R, F>(self, len: usize, f: F) -> R
|
||||
where
|
||||
F: FnOnce(&mut [u8]) -> R,
|
||||
|
@ -166,9 +166,12 @@ impl ClockSource {
|
||||
}
|
||||
}
|
||||
|
||||
/// `Instant` captures a specific moment, storing the duration of time
|
||||
/// A specific moment.
|
||||
///
|
||||
/// [`Instant`] captures a specific moment, storing the duration of time
|
||||
/// elapsed since a reference point (typically the system boot time).
|
||||
/// The `Instant` is expressed in seconds and the fractional part is expressed in nanoseconds.
|
||||
/// The [`Instant`] is expressed in seconds and the fractional part is
|
||||
/// expressed in nanoseconds.
|
||||
#[derive(Debug, Default, Copy, Clone)]
|
||||
pub struct Instant {
|
||||
secs: u64,
|
||||
|
Reference in New Issue
Block a user