Cleanup lint
This commit is contained in:
parent
ed997b4ba6
commit
4819128bda
@ -1,14 +1,13 @@
|
||||
use chrono::NaiveTime;
|
||||
|
||||
use i3monkit::{ColorRGB, Header, I3Protocol, WidgetCollection};
|
||||
|
||||
use i3xs::widgets::{
|
||||
cpu::CpuWidget,
|
||||
datetime::{DateTimeWidget, TimeColor},
|
||||
network::NetworkSpeedWidget,
|
||||
power::PowerSupply,
|
||||
};
|
||||
use structopt::StructOpt;
|
||||
|
||||
use i3xs::widgets::cpu::CpuWidget;
|
||||
use i3xs::widgets::datetime::{DateTimeWidget, TimeColor};
|
||||
use i3xs::widgets::network::NetworkSpeedWidget;
|
||||
use i3xs::widgets::power::PowerSupply;
|
||||
|
||||
#[derive(Debug, StructOpt)]
|
||||
#[structopt(name = "i3xs", about = "Custom i3 status bar program.")]
|
||||
struct Opt {
|
||||
@ -30,11 +29,11 @@ fn main() {
|
||||
let mut dt = DateTimeWidget::new("%m/%d %H:%M");
|
||||
dt.set_colors(vec![
|
||||
TimeColor {
|
||||
start: NaiveTime::from_hms(19, 0, 0),
|
||||
start: NaiveTime::from_hms_opt(19, 0, 0).unwrap(),
|
||||
color: ColorRGB::yellow(),
|
||||
},
|
||||
TimeColor {
|
||||
start: NaiveTime::from_hms(20, 0, 0),
|
||||
start: NaiveTime::from_hms_opt(20, 0, 0).unwrap(),
|
||||
color: ColorRGB::red(),
|
||||
},
|
||||
]);
|
||||
|
||||
@ -1,14 +1,13 @@
|
||||
use chrono::NaiveTime;
|
||||
|
||||
use i3monkit::{ColorRGB, Header, I3Protocol, WidgetCollection};
|
||||
|
||||
use i3xs::widgets::{
|
||||
cpu::CpuWidget,
|
||||
datetime::{DateTimeWidget, TimeColor},
|
||||
network::NetworkSpeedWidget,
|
||||
power::PowerSupply,
|
||||
};
|
||||
use structopt::StructOpt;
|
||||
|
||||
use i3xs::widgets::cpu::CpuWidget;
|
||||
use i3xs::widgets::datetime::{DateTimeWidget, TimeColor};
|
||||
use i3xs::widgets::network::NetworkSpeedWidget;
|
||||
use i3xs::widgets::power::PowerSupply;
|
||||
|
||||
#[derive(Debug, StructOpt)]
|
||||
#[structopt(name = "i3xs", about = "Custom i3 status bar program.")]
|
||||
struct Opt {
|
||||
@ -30,19 +29,19 @@ fn main() {
|
||||
let mut dt = DateTimeWidget::tz("%H:%M %Z", chrono_tz::Europe::London);
|
||||
dt.set_colors(vec![
|
||||
TimeColor {
|
||||
start: NaiveTime::from_hms(0, 0, 0),
|
||||
start: NaiveTime::from_hms_opt(0, 0, 0).unwrap(),
|
||||
color: ColorRGB::red(),
|
||||
},
|
||||
TimeColor {
|
||||
start: NaiveTime::from_hms(8, 0, 0),
|
||||
start: NaiveTime::from_hms_opt(8, 0, 0).unwrap(),
|
||||
color: ColorRGB(255, 255, 255),
|
||||
},
|
||||
TimeColor {
|
||||
start: NaiveTime::from_hms(17, 0, 0),
|
||||
start: NaiveTime::from_hms_opt(17, 0, 0).unwrap(),
|
||||
color: ColorRGB::yellow(),
|
||||
},
|
||||
TimeColor {
|
||||
start: NaiveTime::from_hms(18, 0, 0),
|
||||
start: NaiveTime::from_hms_opt(18, 0, 0).unwrap(),
|
||||
color: ColorRGB::red(),
|
||||
},
|
||||
]);
|
||||
@ -51,19 +50,19 @@ fn main() {
|
||||
let mut dt = DateTimeWidget::new("%m/%d %H:%M");
|
||||
dt.set_colors(vec![
|
||||
TimeColor {
|
||||
start: NaiveTime::from_hms(0, 0, 0),
|
||||
start: NaiveTime::from_hms_opt(0, 0, 0).unwrap(),
|
||||
color: ColorRGB::red(),
|
||||
},
|
||||
TimeColor {
|
||||
start: NaiveTime::from_hms(7, 0, 0),
|
||||
start: NaiveTime::from_hms_opt(7, 0, 0).unwrap(),
|
||||
color: ColorRGB(255, 255, 255),
|
||||
},
|
||||
TimeColor {
|
||||
start: NaiveTime::from_hms(15, 0, 0),
|
||||
start: NaiveTime::from_hms_opt(15, 0, 0).unwrap(),
|
||||
color: ColorRGB::yellow(),
|
||||
},
|
||||
TimeColor {
|
||||
start: NaiveTime::from_hms(16, 0, 0),
|
||||
start: NaiveTime::from_hms_opt(16, 0, 0).unwrap(),
|
||||
color: ColorRGB::red(),
|
||||
},
|
||||
]);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user