1
0
Fork 0
mirror of https://gitlab.com/msrd0/gotham-restful.git synced 2025-02-22 20:52:27 +00:00

track gotham master

This commit is contained in:
Dominic 2021-02-28 01:59:59 +01:00
parent bb6f5b0fdd
commit 960ba0e8bc
Signed by: msrd0
GPG key ID: DCC8C247452E98F9
2 changed files with 7 additions and 7 deletions

View file

@ -5,7 +5,7 @@ members = [".", "./derive", "./example"]
[package] [package]
name = "gotham_restful" name = "gotham_restful"
version = "0.2.0" version = "0.3.0-dev"
authors = ["Dominic Meiser <git@msrd0.de>"] authors = ["Dominic Meiser <git@msrd0.de>"]
edition = "2018" edition = "2018"
description = "RESTful additions for the gotham web framework" description = "RESTful additions for the gotham web framework"
@ -22,7 +22,7 @@ gitlab = { repository = "msrd0/gotham-restful", branch = "master" }
[dependencies] [dependencies]
futures-core = "0.3.7" futures-core = "0.3.7"
futures-util = "0.3.7" futures-util = "0.3.7"
gotham = { version = "0.5.0", default-features = false } gotham = { git = "https://github.com/gotham-rs/gotham", default-features = false }
gotham_derive = "0.5.0" gotham_derive = "0.5.0"
gotham_restful_derive = "0.2.0" gotham_restful_derive = "0.2.0"
log = "0.4.8" log = "0.4.8"
@ -37,7 +37,7 @@ uuid = { version = "0.8.1", optional = true }
# non-feature optional dependencies # non-feature optional dependencies
base64 = { version = "0.13.0", optional = true } base64 = { version = "0.13.0", optional = true }
cookie = { version = "0.14", optional = true } cookie = { version = "0.15", optional = true }
gotham_middleware_diesel = { version = "0.2.0", optional = true } gotham_middleware_diesel = { version = "0.2.0", optional = true }
indexmap = { version = "1.3.2", optional = true } indexmap = { version = "1.3.2", optional = true }
indoc = { version = "1.0", optional = true } indoc = { version = "1.0", optional = true }
@ -52,7 +52,7 @@ diesel = { version = "1.4.4", features = ["postgres"] }
futures-executor = "0.3.5" futures-executor = "0.3.5"
paste = "1.0" paste = "1.0"
pretty_env_logger = "0.4" pretty_env_logger = "0.4"
tokio = { version = "0.2", features = ["time"], default-features = false } tokio = { version = "1.0", features = ["time"], default-features = false }
thiserror = "1.0.18" thiserror = "1.0.18"
trybuild = "1.0.27" trybuild = "1.0.27"

View file

@ -10,7 +10,7 @@ use gotham::{
use gotham_restful::*; use gotham_restful::*;
use mime::{APPLICATION_JSON, TEXT_PLAIN}; use mime::{APPLICATION_JSON, TEXT_PLAIN};
use serde::Deserialize; use serde::Deserialize;
use tokio::time::{delay_for, Duration}; use tokio::time::{sleep, Duration};
mod util { mod util {
include!("util/mod.rs"); include!("util/mod.rs");
@ -86,9 +86,9 @@ async fn remove(_id: u64) -> Raw<&'static [u8]> {
const STATE_TEST_RESPONSE: &[u8] = b"xxJbxOuwioqR5DfzPuVqvaqRSfpdNQGluIvHU4n1LM"; const STATE_TEST_RESPONSE: &[u8] = b"xxJbxOuwioqR5DfzPuVqvaqRSfpdNQGluIvHU4n1LM";
#[endpoint(method = "Method::GET", uri = "state_test")] #[endpoint(method = "Method::GET", uri = "state_test")]
async fn state_test(state: &mut State) -> Raw<&'static [u8]> { async fn state_test(state: &mut State) -> Raw<&'static [u8]> {
delay_for(Duration::from_nanos(1)).await; sleep(Duration::from_nanos(1)).await;
state.borrow::<HeaderMap>(); state.borrow::<HeaderMap>();
delay_for(Duration::from_nanos(1)).await; sleep(Duration::from_nanos(1)).await;
Raw::new(STATE_TEST_RESPONSE, TEXT_PLAIN) Raw::new(STATE_TEST_RESPONSE, TEXT_PLAIN)
} }