generated from PlexSheep/rs-base
chore: address clippy findings
cargo devel CI / cargo CI (push) Successful in 1m45s
Details
cargo devel CI / cargo CI (push) Successful in 1m45s
Details
This commit is contained in:
parent
0853ee103b
commit
80b466efdf
|
@ -1,5 +1,10 @@
|
||||||
#![warn(clippy::pedantic, clippy::style, clippy::nursery)]
|
#![warn(clippy::pedantic, clippy::style, clippy::nursery)]
|
||||||
|
// That's useful and sometimes I don't need extra stuff
|
||||||
#![allow(clippy::question_mark_used)]
|
#![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 chrono::{DateTime, Local, SubsecRound, Timelike};
|
||||||
use clap::Parser;
|
use clap::Parser;
|
||||||
|
@ -257,6 +262,7 @@ impl Clock {
|
||||||
fn on_tick(&mut self) {
|
fn on_tick(&mut self) {
|
||||||
self.maybe_reset_since_zero();
|
self.maybe_reset_since_zero();
|
||||||
}
|
}
|
||||||
|
#[allow(clippy::cast_possible_truncation)] // if we have that much padding, please truncate
|
||||||
fn ui(
|
fn ui(
|
||||||
&mut self,
|
&mut self,
|
||||||
terminal: &mut Terminal<CrosstermBackend<Stdout>>,
|
terminal: &mut Terminal<CrosstermBackend<Stdout>>,
|
||||||
|
|
|
@ -61,6 +61,8 @@ impl Data {
|
||||||
|
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[inline]
|
#[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> {
|
pub fn now(&self) -> &DateTime<Local> {
|
||||||
&self.now[self.idx]
|
&self.now[self.idx]
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#![allow(missing_docs)] // this is not a library crate
|
||||||
|
|
||||||
use std::io;
|
use std::io;
|
||||||
|
|
||||||
use libpt::cli::clap::Parser;
|
use libpt::cli::clap::Parser;
|
||||||
|
|
Reference in New Issue