diff options
| author | Christine Dodrill <me@christine.website> | 2021-01-22 21:11:48 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-22 21:11:48 -0500 |
| commit | 990cce7267dae9bdd37ef772db2edeef2a39365b (patch) | |
| tree | dbf370c4af264f662c5acb28ea090876edbcccfd /src | |
| parent | 6456d75502d89986f8f05dad7965291fd0e5c933 (diff) | |
| download | xesite-990cce7267dae9bdd37ef772db2edeef2a39365b.tar.xz xesite-990cce7267dae9bdd37ef772db2edeef2a39365b.zip | |
Use Tokio 1 (#306)
* upgrade all the things
Signed-off-by: Christine Dodrill <me@christine.website>
* build(deps): bump serde from 1.0.118 to 1.0.120
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.118 to 1.0.120.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.118...v1.0.120)
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
* fix
Signed-off-by: Christine Dodrill <me@christine.website>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/app/poke.rs | 2 | ||||
| -rw-r--r-- | src/handlers/mod.rs | 14 |
2 files changed, 2 insertions, 14 deletions
diff --git a/src/app/poke.rs b/src/app/poke.rs index dd6f9fe..eddb85e 100644 --- a/src/app/poke.rs +++ b/src/app/poke.rs @@ -1,6 +1,6 @@ use color_eyre::eyre::Result; use std::{env, time::Duration}; -use tokio::time::delay_for; +use tokio::time::sleep as delay_for; #[instrument(err)] pub async fn the_cloud() -> Result<()> { diff --git a/src/handlers/mod.rs b/src/handlers/mod.rs index d180a11..c6dbd65 100644 --- a/src/handlers/mod.rs +++ b/src/handlers/mod.rs @@ -5,11 +5,11 @@ use crate::{ use lazy_static::lazy_static; use prometheus::{opts, register_int_counter_vec, IntCounterVec}; use std::{convert::Infallible, fmt, sync::Arc}; +use tracing::instrument; use warp::{ http::{Response, StatusCode}, Rejection, Reply, }; -use tracing::instrument; lazy_static! { static ref HIT_COUNTER: IntCounterVec = @@ -86,12 +86,6 @@ impl fmt::Display for PostNotFound { impl warp::reject::Reject for PostNotFound {} -impl From<PostNotFound> for warp::reject::Rejection { - fn from(error: PostNotFound) -> Self { - warp::reject::custom(error) - } -} - #[derive(Debug, thiserror::Error)] struct SeriesNotFound(String); @@ -103,12 +97,6 @@ impl fmt::Display for SeriesNotFound { impl warp::reject::Reject for SeriesNotFound {} -impl From<SeriesNotFound> for warp::reject::Rejection { - fn from(error: SeriesNotFound) -> Self { - warp::reject::custom(error) - } -} - lazy_static! { static ref REJECTION_COUNTER: IntCounterVec = register_int_counter_vec!( opts!("rejections", "Number of rejections by kind"), |
