mirror of
https://github.com/SkyfallWasTaken/arcade-monitor.git
synced 2024-11-25 18:33:48 +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)]
|
#[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() {
|
||||||
|
|
|
@ -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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue