Skip to content

Commit 511dc22

Browse files
committed
cleanup cron example
1 parent 2f9b7eb commit 511dc22

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

examples/cron/api/cron.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
use slack_morphism::{errors::SlackClientError, prelude::*};
2-
use std::collections::HashMap;
3-
use url::Url;
42
use vercel_runtime::{run, Body, Error, Request, Response, StatusCode};
53

64
#[derive(Debug, Clone)]
@@ -35,11 +33,9 @@ impl<T: SlackClientHttpConnector + Send + Sync> Lambda<'_, T> {
3533
let headers = req.headers();
3634

3735
match headers.get("authorization") {
38-
None => {
39-
return Ok(Response::builder()
40-
.status(StatusCode::NOT_FOUND)
41-
.body(().into())?);
42-
}
36+
None => Ok(Response::builder()
37+
.status(StatusCode::NOT_FOUND)
38+
.body(().into())?),
4339
Some(authorization_header) => {
4440
let authorization_string = authorization_header.to_str().unwrap();
4541

0 commit comments

Comments
 (0)