aboutsummaryrefslogtreecommitdiff
path: root/src/commands/today
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/today')
-rw-r--r--src/commands/today/halloween.rs14
-rw-r--r--src/commands/today/nov_5.rs14
-rw-r--r--src/commands/today/pianoman.rs13
-rw-r--r--src/commands/today/prelude.rs3
-rw-r--r--src/commands/today/thursday.rs6
-rw-r--r--src/commands/today/tomorrow.rs14
-rw-r--r--src/commands/today/wednesday.rs6
7 files changed, 23 insertions, 47 deletions
diff --git a/src/commands/today/halloween.rs b/src/commands/today/halloween.rs
index 3fb1c18..f09146b 100644
--- a/src/commands/today/halloween.rs
+++ b/src/commands/today/halloween.rs
@@ -1,12 +1,10 @@
use super::prelude::*;
lazy_static! {
- static ref HALLOWEEN: Vec<TodayArgs> = vec![
- TodayArgs {
- url: "https://www.youtube.com/watch?v=-1dSY6ZuXEY",
- ..Default::default()
- },
- ];
+ static ref HALLOWEEN: Vec<TodayArgs> = vec![TodayArgs {
+ url: "https://www.youtube.com/watch?v=-1dSY6ZuXEY",
+ ..Default::default()
+ },];
}
pub fn halloween(date: chrono::NaiveDateTime) -> TodayIter {
@@ -14,7 +12,5 @@ pub fn halloween(date: chrono::NaiveDateTime) -> TodayIter {
return Box::new(empty());
}
- Box::new(
- HALLOWEEN.iter().cloned()
- )
+ Box::new(HALLOWEEN.iter().cloned())
}
diff --git a/src/commands/today/nov_5.rs b/src/commands/today/nov_5.rs
index b4eafc9..f46c126 100644
--- a/src/commands/today/nov_5.rs
+++ b/src/commands/today/nov_5.rs
@@ -5,13 +5,9 @@ pub fn nov_5(date: chrono::NaiveDateTime) -> TodayIter {
return Box::new(empty());
}
- Box::new(
- once(
- TodayArgs {
- url: "https://www.youtube.com/watch?v=LF1951pENdk",
- start: Some(Duration::seconds(25)),
- end: Some(Duration::seconds(39)),
- }
- )
- )
+ Box::new(once(TodayArgs {
+ url: "https://www.youtube.com/watch?v=LF1951pENdk",
+ start: Some(Duration::seconds(25)),
+ end: Some(Duration::seconds(39)),
+ }))
}
diff --git a/src/commands/today/pianoman.rs b/src/commands/today/pianoman.rs
index e3a997f..22e8b61 100644
--- a/src/commands/today/pianoman.rs
+++ b/src/commands/today/pianoman.rs
@@ -3,15 +3,12 @@ use super::prelude::*;
lazy_static! {
static ref NINE_AM: chrono::NaiveTime = chrono::NaiveTime::from_hms_opt(9, 0, 0).unwrap();
static ref NINE_PM: chrono::NaiveTime = chrono::NaiveTime::from_hms_opt(21, 0, 0).unwrap();
-
- static ref PIANOMANS: Vec<TodayArgs> = vec![
- by_url("https://www.youtube.com/watch?v=gxEPV4kolz0"),
- TodayArgs {
- url: "https://www.youtube.com/watch?v=gxEPV4kolz0",
+ static ref PIANOMANS: Vec<TodayArgs> =
+ vec![by_url("https://www.youtube.com/watch?v=gxEPV4kolz0"), TodayArgs {
+ url: "https://www.youtube.com/watch?v=gxEPV4kolz0",
start: Some(Duration::seconds(30)),
- end: Some(Duration::seconds(34)),
- }
- ];
+ end: Some(Duration::seconds(34)),
+ }];
}
pub fn pianoman(dt: chrono::NaiveDateTime) -> TodayIter {
diff --git a/src/commands/today/prelude.rs b/src/commands/today/prelude.rs
index d5f470d..f02fffc 100644
--- a/src/commands/today/prelude.rs
+++ b/src/commands/today/prelude.rs
@@ -1,6 +1,6 @@
pub use std::iter::{
- once,
empty,
+ once,
};
pub use lazy_static::lazy_static;
@@ -15,7 +15,6 @@ pub use super::{
TodayIter,
};
-
#[inline]
pub fn month_day(date: chrono::NaiveDateTime) -> (u32, u32) {
(date.month(), date.day())
diff --git a/src/commands/today/thursday.rs b/src/commands/today/thursday.rs
index 0215293..f4c14af 100644
--- a/src/commands/today/thursday.rs
+++ b/src/commands/today/thursday.rs
@@ -5,9 +5,5 @@ pub fn thursday(date: chrono::NaiveDateTime) -> TodayIter {
return Box::new(empty());
}
- Box::new(
- once(
- by_url("https://www.youtube.com/watch?v=W6o44AfYWQE")
- )
- )
+ Box::new(once(by_url("https://www.youtube.com/watch?v=W6o44AfYWQE")))
}
diff --git a/src/commands/today/tomorrow.rs b/src/commands/today/tomorrow.rs
index ad5c37d..a483541 100644
--- a/src/commands/today/tomorrow.rs
+++ b/src/commands/today/tomorrow.rs
@@ -1,13 +1,9 @@
use super::prelude::*;
pub fn tomorrow(_date: chrono::NaiveDateTime) -> TodayIter {
- Box::new(
- once(
- TodayArgs {
- url: "https://www.youtube.com/watch?v=W78AGkm_AtE",
- start: None,
- end: Some(Duration::seconds(6))
- }
- )
- )
+ Box::new(once(TodayArgs {
+ url: "https://www.youtube.com/watch?v=W78AGkm_AtE",
+ start: None,
+ end: Some(Duration::seconds(6)),
+ }))
}
diff --git a/src/commands/today/wednesday.rs b/src/commands/today/wednesday.rs
index 0748a0b..d9bf81d 100644
--- a/src/commands/today/wednesday.rs
+++ b/src/commands/today/wednesday.rs
@@ -5,9 +5,5 @@ pub fn wednesday(date: chrono::NaiveDateTime) -> TodayIter {
return Box::new(empty());
}
- Box::new(
- once(
- by_url("https://www.youtube.com/watch?v=du-TY1GUFGk")
- )
- )
+ Box::new(once(by_url("https://www.youtube.com/watch?v=du-TY1GUFGk")))
}