Skip to content

Commit

Permalink
fix: u16 is not enough
Browse files Browse the repository at this point in the history
  • Loading branch information
nazo6 committed Nov 30, 2024
1 parent c8a9ce7 commit 74872be
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/rktk-keymanager/src/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ pub use core::time::Duration;
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord)]
pub struct Instant {
/// Time from start in milliseconds.
from_start: u16,
from_start: u32,
}

impl Instant {
pub const fn from_start(from_start: core::time::Duration) -> Self {

Check warning on line 11 in lib/rktk-keymanager/src/time.rs

View workflow job for this annotation

GitHub Actions / check

associated function `from_start` is never used

Check warning on line 11 in lib/rktk-keymanager/src/time.rs

View workflow job for this annotation

GitHub Actions / check

associated function `from_start` is never used

Check warning on line 11 in lib/rktk-keymanager/src/time.rs

View workflow job for this annotation

GitHub Actions / test

associated function `from_start` is never used
Self {
from_start: from_start.as_millis() as u16,
from_start: from_start.as_millis() as u32,
}
}
}
Expand All @@ -19,7 +19,7 @@ impl Add<Duration> for Instant {
type Output = Self;
fn add(self, rhs: Duration) -> Self {
Self {
from_start: self.from_start + rhs.as_millis() as u16,
from_start: self.from_start + rhs.as_millis() as u32,
}
}
}
Expand Down

0 comments on commit 74872be

Please sign in to comment.