diff options
| author | Dániel Buga <[email protected]> | 2023-09-02 07:44:10 +0200 |
|---|---|---|
| committer | Dániel Buga <[email protected]> | 2023-09-02 08:39:52 +0200 |
| commit | 0c66636d003979c3aecff36c9e03e87f34147a94 (patch) | |
| tree | d79b1578cb559a40f0bfe8c2a1b33263cecc4364 /embassy-time/src/instant.rs | |
| parent | 8339423a2f194d31f3f26d956f68dfcef46f8891 (diff) | |
Use fmt::unwrap
Diffstat (limited to 'embassy-time/src/instant.rs')
| -rw-r--r-- | embassy-time/src/instant.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/embassy-time/src/instant.rs b/embassy-time/src/instant.rs index 44f226f62..5571cdd15 100644 --- a/embassy-time/src/instant.rs +++ b/embassy-time/src/instant.rs | |||
| @@ -71,7 +71,7 @@ impl Instant { | |||
| 71 | /// Panics on over/underflow. | 71 | /// Panics on over/underflow. |
| 72 | pub fn duration_since(&self, earlier: Instant) -> Duration { | 72 | pub fn duration_since(&self, earlier: Instant) -> Duration { |
| 73 | Duration { | 73 | Duration { |
| 74 | ticks: self.ticks.checked_sub(earlier.ticks).unwrap(), | 74 | ticks: unwrap!(self.ticks.checked_sub(earlier.ticks)), |
| 75 | } | 75 | } |
| 76 | } | 76 | } |
| 77 | 77 | ||
