Merge branch 'master' into devel
cargo devel CI / cargo CI (push) Successful in 1m43s Details

This commit is contained in:
Christoph J. Scherr 2024-07-26 10:57:03 +02:00
commit 12efcf45a8
4 changed files with 11 additions and 1 deletions

View File

@ -1,6 +1,6 @@
[package]
name = "crock"
version = "0.2.2"
version = "0.2.1"
edition = "2021"
publish = true
authors = ["Christoph J. Scherr <software@cscherr.de>"]

View File

@ -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<CrosstermBackend<Stdout>>,

View File

@ -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<Local> {
&self.now[self.idx]
}

View File

@ -1,3 +1,5 @@
#![allow(missing_docs)] // this is not a library crate
use std::io;
use libpt::cli::clap::Parser;