diff --git a/build.rs b/build.rs index 62221b6..475367f 100644 --- a/build.rs +++ b/build.rs @@ -1,7 +1,7 @@ -use std::process::Command; +use std::{env, process, process::Command}; fn main() { - if std::env::var("SKIP_BUILD_RS").is_ok() { + if env::var("SKIP_BUILD_RS").is_ok() { println!("Skipping build.rs tasks"); return; } @@ -12,8 +12,8 @@ fn main() { .expect("Failed to install npm packages"); if !status.success() { - eprintln!("npm install failed with status: {}", status); - std::process::exit(1); + println!("npm install failed with status: {status}"); + process::exit(1); } let status = Command::new("npm") @@ -22,7 +22,7 @@ fn main() { .expect("Failed to build the web app"); if !status.success() { - eprintln!("npm build failed with status: {}", status); - std::process::exit(1); + println!("npm build failed with status: {status}"); + process::exit(1); } } diff --git a/src/model/store/mod.rs b/src/model/store/mod.rs index edcca09..9290985 100644 --- a/src/model/store/mod.rs +++ b/src/model/store/mod.rs @@ -13,7 +13,7 @@ const MIGRATIONS: EmbeddedMigrations = embed_migrations!("src/model/store/migrat /// pub fn establish_connection() -> SqliteConnection { let mut conn = SqliteConnection::establish("./data/metal.db").unwrap_or_else(|_| { - eprintln!("Error connecting to {}", "./data/metal.db"); + eprintln!("Error connecting to ./data/metal.db"); std::process::exit(1); }); diff --git a/src/scraper/wiki.rs b/src/scraper/wiki.rs index 1cff53e..3abb406 100644 --- a/src/scraper/wiki.rs +++ b/src/scraper/wiki.rs @@ -2185,6 +2185,7 @@ mod tests { 14, vec![ Release::new("Bleeding Through", "Nine"), + Release::new("Church Tongue", "You'll Know It Was Me (EP)"), Release::new("Dawn of Solace", "Affliction Vortex"), Release::new("Dynazty", "Game of Faces"), Release::new("Lacuna Coil", "Sleepless Empire"), @@ -2199,6 +2200,7 @@ mod tests { ( 21, vec![ + Release::new("David Lee Roth", "The Warner Recordings 1985–1994 (box set)"), Release::new("Hirax", "Faster Than Death"), Release::new("Killswitch Engage", "This Consequence"), Release::new("Manntra", "Titans"), @@ -2230,6 +2232,8 @@ mod tests { 7, vec![ Release::new("Destruction", "Birth of Malice"), + Release::new("Edge of Paradise", "Prophecy"), + Release::new("Sadist", "Something to Pierce"), Release::new("Smith / Kotzen", "Black Light / White Noise"), Release::new("Spiritbox", "Tsunami Sea"), ], @@ -2246,7 +2250,10 @@ mod tests { Release::new("Warbringer", "Wrath and Ruin"), ], ), - (21, vec![Release::new("Lordi", "Limited Deadition")]), + (21, vec![ + Release::new("Lordi", "Limited Deadition"), + Release::new("Pop Evil", "What Remains"), + ]), ( 28, vec![ diff --git a/src/support/email.rs b/src/support/email.rs index fb8c5c6..49f580a 100644 --- a/src/support/email.rs +++ b/src/support/email.rs @@ -33,7 +33,7 @@ pub fn send_email(smtp_config: &SmtpConfig, from: String, body: impl Into { let creds = Credentials::new(smtp_username.into(), smtp_password.into()); diff --git a/src/web/handlers_calendar.rs b/src/web/handlers_calendar.rs index 0b49f87..44ba5fb 100644 --- a/src/web/handlers_calendar.rs +++ b/src/web/handlers_calendar.rs @@ -165,7 +165,7 @@ async fn feed_handler( now.day() ); - let custom_feed_id = feed_query.id.unwrap_or_else(|| -1); + let custom_feed_id = feed_query.id.unwrap_or(-1); match state.feed_repo.get(12, custom_feed_id) { Ok(feeds) => (