mirror of
https://github.com/SkyfallWasTaken/arcade-monitor.git
synced 2024-11-10 03:49:40 +00:00
Placate clippy
This commit is contained in:
parent
2bacb34e84
commit
4c34f69a79
2 changed files with 5 additions and 5 deletions
|
@ -61,6 +61,7 @@ pub fn format_new_item(item: &ShopItem) -> String {
|
|||
#[cfg(test)]
|
||||
mod format_new_tests {
|
||||
use super::*;
|
||||
use indoc::indoc;
|
||||
|
||||
#[test]
|
||||
fn item_formatted() {
|
||||
|
|
|
@ -23,10 +23,9 @@ pub async fn main(req: Request, env: Env, _ctx: worker::Context) -> Result<Respo
|
|||
|
||||
#[event(scheduled)]
|
||||
pub async fn scheduled(_event: ScheduledEvent, env: Env, _ctx: ScheduleContext) {
|
||||
run_scrape(env).await.expect(&format!(
|
||||
"failed to run scheduled scrape: {}",
|
||||
_event.schedule()
|
||||
));
|
||||
run_scrape(env)
|
||||
.await
|
||||
.unwrap_or_else(|_| panic!("failed to run scheduled scrape: {}", _event.schedule()));
|
||||
}
|
||||
|
||||
async fn run_scrape(env: Env) -> Result<String> {
|
||||
|
@ -54,7 +53,7 @@ async fn run_scrape(env: Env) -> Result<String> {
|
|||
}
|
||||
}
|
||||
None => {
|
||||
result.push(format::format_new_item(&item));
|
||||
result.push(format::format_new_item(item));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue