From 125a3e67f4d7dc1a1ffc18fdd84eccc43bd75cad Mon Sep 17 00:00:00 2001 From: Brian Smith Date: Fri, 31 May 2024 16:39:11 -0700 Subject: [PATCH] Enforce important cast-related lints. --- src/lib.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index e4f11006..9bf9e287 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -208,6 +208,14 @@ #![no_std] #![warn(rust_2018_idioms, unused_lifetimes, missing_docs)] #![cfg_attr(docsrs, feature(doc_auto_cfg))] +#![deny( + clippy::unnecessary_cast, + clippy::cast_lossless, + clippy::cast_possible_truncation, + clippy::cast_possible_wrap, + clippy::cast_precision_loss, + clippy::cast_sign_loss +)] #[macro_use] extern crate cfg_if;