generated from PlexSheep/rs-base
Compare commits
2 commits
23a417a9f9
...
89a636589d
Author | SHA1 | Date | |
---|---|---|---|
89a636589d | |||
2f306304b3 |
2 changed files with 6 additions and 8 deletions
|
@ -6,7 +6,7 @@
|
||||||
#![allow(clippy::cast_possible_wrap)]
|
#![allow(clippy::cast_possible_wrap)]
|
||||||
#![allow(clippy::cast_sign_loss)] // it should only be positive anyway
|
#![allow(clippy::cast_sign_loss)] // it should only be positive anyway
|
||||||
|
|
||||||
use chrono::{Date, DateTime, Local, SubsecRound, Timelike};
|
use chrono::{DateTime, Local, SubsecRound, Timelike};
|
||||||
use clap::Parser;
|
use clap::Parser;
|
||||||
use libpt::cli::args::HELP_TEMPLATE;
|
use libpt::cli::args::HELP_TEMPLATE;
|
||||||
use libpt::cli::clap::ArgGroup;
|
use libpt::cli::clap::ArgGroup;
|
||||||
|
@ -70,8 +70,6 @@ pub struct Clock {
|
||||||
pub(crate) last_reset: Option<DateTime<Local>>,
|
pub(crate) last_reset: Option<DateTime<Local>>,
|
||||||
#[clap(skip)]
|
#[clap(skip)]
|
||||||
pub(crate) did_notify: bool,
|
pub(crate) did_notify: bool,
|
||||||
#[clap(skip)]
|
|
||||||
pub(crate) started_at: DateTime<Local>,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Clock {
|
impl Clock {
|
||||||
|
|
|
@ -27,12 +27,12 @@ pub struct Data {
|
||||||
impl Data {
|
impl Data {
|
||||||
pub fn new(timebar_type: TimeBarLength) -> Self {
|
pub fn new(timebar_type: TimeBarLength) -> Self {
|
||||||
let mut this = Self {
|
let mut this = Self {
|
||||||
now: [Default::default(); 2],
|
now: [DateTime::default(); 2],
|
||||||
fdate: ["".to_string(), "".to_string()],
|
fdate: [String::new(), String::new()],
|
||||||
ftime: ["".to_string(), "".to_string()],
|
ftime: [String::new(), String::new()],
|
||||||
timebar_ratio: [Default::default(); 2],
|
timebar_ratio: [Option::default(); 2],
|
||||||
started_at: Local::now(),
|
started_at: Local::now(),
|
||||||
idx: Default::default(),
|
idx: usize::default(),
|
||||||
|
|
||||||
timebar_type,
|
timebar_type,
|
||||||
};
|
};
|
||||||
|
|
Reference in a new issue