diff --git a/Cargo.toml b/Cargo.toml index 91389ea..6e7d2ab 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "crock" -version = "0.2.2" +version = "0.2.1" edition = "2021" publish = true authors = ["Christoph J. Scherr "] diff --git a/src/clock.rs b/src/clock.rs index c8cdf92..922d2a8 100644 --- a/src/clock.rs +++ b/src/clock.rs @@ -1,5 +1,10 @@ #![warn(clippy::pedantic, clippy::style, clippy::nursery)] +// That's useful and sometimes I don't need extra stuff #![allow(clippy::question_mark_used)] +// allows us to cast u64 to i64, if the number is too high +// enough time has passed that I don't care +#![allow(clippy::cast_possible_wrap)] +#![allow(clippy::cast_sign_loss)] // it should only be positive anyway use chrono::{DateTime, Local, SubsecRound, Timelike}; use clap::Parser; @@ -257,6 +262,7 @@ impl Clock { fn on_tick(&mut self) { self.maybe_reset_since_zero(); } + #[allow(clippy::cast_possible_truncation)] // if we have that much padding, please truncate fn ui( &mut self, terminal: &mut Terminal>, diff --git a/src/clock/ui.rs b/src/clock/ui.rs index f13b98d..afa53e9 100644 --- a/src/clock/ui.rs +++ b/src/clock/ui.rs @@ -61,6 +61,8 @@ impl Data { #[must_use] #[inline] + #[allow(clippy::missing_const_for_fn)] // why should it be okay to make this const? This is + // a custom ringbuffer! pub fn now(&self) -> &DateTime { &self.now[self.idx] } diff --git a/src/main.rs b/src/main.rs index 0186fa2..3b04d7e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,5 @@ +#![allow(missing_docs)] // this is not a library crate + use std::io; use libpt::cli::clap::Parser;