resolve almost all as_conversions lints

may need further opinion from others on these

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-05-04 09:45:37 -04:00 committed by June
parent f8e1255994
commit 0ebb323490
18 changed files with 144 additions and 85 deletions

View file

@ -21,6 +21,7 @@ use crate::{services, Error, Result};
pub(crate) fn clamp<T: Ord>(val: T, min: T, max: T) -> T { cmp::min(cmp::max(val, min), max) }
#[allow(clippy::as_conversions)]
pub(crate) fn millis_since_unix_epoch() -> u64 {
SystemTime::now()
.duration_since(UNIX_EPOCH)