Placate clippy

This commit is contained in:
SkyfallWasTaken 2024-07-02 17:55:45 +01:00
parent 2bacb34e84
commit 4c34f69a79
2 changed files with 5 additions and 5 deletions

View file

@ -61,6 +61,7 @@ pub fn format_new_item(item: &ShopItem) -> String {
#[cfg(test)] #[cfg(test)]
mod format_new_tests { mod format_new_tests {
use super::*; use super::*;
use indoc::indoc;
#[test] #[test]
fn item_formatted() { fn item_formatted() {

View file

@ -23,10 +23,9 @@ pub async fn main(req: Request, env: Env, _ctx: worker::Context) -> Result<Respo
#[event(scheduled)] #[event(scheduled)]
pub async fn scheduled(_event: ScheduledEvent, env: Env, _ctx: ScheduleContext) { pub async fn scheduled(_event: ScheduledEvent, env: Env, _ctx: ScheduleContext) {
run_scrape(env).await.expect(&format!( run_scrape(env)
"failed to run scheduled scrape: {}", .await
_event.schedule() .unwrap_or_else(|_| panic!("failed to run scheduled scrape: {}", _event.schedule()));
));
} }
async fn run_scrape(env: Env) -> Result<String> { async fn run_scrape(env: Env) -> Result<String> {
@ -54,7 +53,7 @@ async fn run_scrape(env: Env) -> Result<String> {
} }
} }
None => { None => {
result.push(format::format_new_item(&item)); result.push(format::format_new_item(item));
} }
} }
} }