Skip to content
Snippets Groups Projects
Verified Commit eccb3d31 authored by Louis's avatar Louis :fire:
Browse files

Fix lints

parent a20f3297
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,7 @@ use std::fmt::{Debug, Formatter};
use std::ops::{Add, AddAssign, Sub, SubAssign};
use std::time::{Duration, Instant};
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Copy, Clone, PartialEq, PartialOrd)]
pub struct Spot {
inner: Instant,
......@@ -39,7 +40,7 @@ impl Spot {
/// Returns the amount of time elapsed from another instant to this one,
/// or zero duration if that instant is later than this one.
pub fn saturating_duration_since(&self, earlier: Spot) -> Duration {
self.inner.saturating_duration_since(earlier.inner).unwrap_or_default()
self.inner.saturating_duration_since(earlier.inner)
}
/// Returns `Some(t)` where `t` is the time `self + duration` if `t` can be represented as
/// `Instant` (which means it's inside the bounds of the underlying data structure), `None`
......
#[cfg(not(target_family = "wasm"))]
mod instant_desktop;
// #[cfg(target_family = "wasm")]
#[cfg(target_family = "wasm")]
mod instant_web;
#[cfg(not(target_arch = "wasm32"))]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment