File tree 12 files changed +16
-16
lines changed
12 files changed +16
-16
lines changed Original file line number Diff line number Diff line change 1
1
language : rust
2
- rust : nightly-2019-06-02
2
+ rust : nightly-2019-07-08
3
3
cache : cargo
4
4
5
5
before_script :
Original file line number Diff line number Diff line change 1
- #![ feature( async_await) ]
1
+ #![ feature( async_await, async_closure ) ]
2
2
3
3
use http:: header:: HeaderValue ;
4
4
use tide:: middleware:: CorsMiddleware ;
Original file line number Diff line number Diff line change 1
- #![ feature( async_await) ]
1
+ #![ feature( async_await, async_closure ) ]
2
2
3
3
use tide:: middleware:: DefaultHeaders ;
4
4
Original file line number Diff line number Diff line change 1
- #![ feature( async_await) ]
1
+ #![ feature( async_await, async_closure ) ]
2
2
fn main ( ) {
3
3
let mut app = tide:: App :: new ( ) ;
4
4
app. at ( "/" ) . get ( async move |_| "Hello, world!" ) ;
Original file line number Diff line number Diff line change 1
- #![ feature( async_await) ]
1
+ #![ feature( async_await, async_closure ) ]
2
2
fn main ( ) {
3
3
env_logger:: from_env ( env_logger:: Env :: default ( ) . default_filter_or ( "info" ) ) . init ( ) ;
4
4
let mut app = tide:: App :: new ( ) ;
Original file line number Diff line number Diff line change 1
- #![ feature( async_await) ]
1
+ #![ feature( async_await, async_closure ) ]
2
2
fn main ( ) {
3
3
use log:: LevelFilter ;
4
4
use log4rs:: append:: console:: ConsoleAppender ;
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ async fn set_message(mut cx: Context<Database>) -> EndpointResult<()> {
51
51
if cx. state ( ) . set ( id, msg) {
52
52
Ok ( ( ) )
53
53
} else {
54
- Err ( StatusCode :: NOT_FOUND ) ?
54
+ Err ( StatusCode :: NOT_FOUND . into ( ) )
55
55
}
56
56
}
57
57
@@ -60,7 +60,7 @@ async fn get_message(cx: Context<Database>) -> EndpointResult {
60
60
if let Some ( msg) = cx. state ( ) . get ( id) {
61
61
Ok ( response:: json ( msg) )
62
62
} else {
63
- Err ( StatusCode :: NOT_FOUND ) ?
63
+ Err ( StatusCode :: NOT_FOUND . into ( ) )
64
64
}
65
65
}
66
66
Original file line number Diff line number Diff line change 1
- #![ feature( async_await) ]
1
+ #![ feature( async_await, async_closure ) ]
2
2
3
3
/// An example of how to run a Tide service on top of `runtime`, this also shows the pieces
4
4
/// necessary if you wish to run a service on some other executor/IO source.
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ use crate::{
30
30
/// on `127.0.0.1:8000` with:
31
31
///
32
32
/// ```rust, no_run
33
- /// #![feature(async_await)]
33
+ /// #![feature(async_await, async_closure )]
34
34
///
35
35
/// let mut app = tide::App::new();
36
36
/// app.at("/hello").get(async move |_| "Hello, world!");
@@ -45,7 +45,7 @@ use crate::{
45
45
/// segments as parameters to endpoints:
46
46
///
47
47
/// ```rust, no_run
48
- /// #![feature(async_await)]
48
+ /// #![feature(async_await, async_closure )]
49
49
///
50
50
/// use tide::error::ResultExt;
51
51
///
@@ -166,7 +166,7 @@ impl<State: Send + Sync + 'static> App<State> {
166
166
/// respective endpoint of the selected resource. Example:
167
167
///
168
168
/// ```rust,no_run
169
- /// # #![feature(async_await)]
169
+ /// # #![feature(async_await, async_closure )]
170
170
/// # let mut app = tide::App::new();
171
171
/// app.at("/").get(async move |_| "Hello, world!");
172
172
/// ```
Original file line number Diff line number Diff line change 4
4
5
5
#![ cfg_attr( any( feature = "nightly" , test) , feature( external_doc) ) ]
6
6
#![ cfg_attr( feature = "nightly" , doc( include = "../README.md" ) ) ]
7
- #![ feature( async_await, existential_type) ]
7
+ #![ feature( async_await, async_closure , existential_type) ]
8
8
#![ warn(
9
9
nonstandard_style,
10
10
rust_2018_idioms,
Original file line number Diff line number Diff line change 1
- #![ feature( async_await) ]
1
+ #![ feature( async_await, async_closure ) ]
2
2
3
3
use futures:: executor:: block_on;
4
4
use http_service:: Body ;
Original file line number Diff line number Diff line change 3
3
//! ## Examples
4
4
//!
5
5
//! ```rust,no_run
6
- //! #![feature(async_await)]
6
+ //! #![feature(async_await, async_closure )]
7
7
//!
8
8
//! use http::header::HeaderValue;
9
9
//! use tide_cors::CorsMiddleware;
30
30
//!
31
31
//! You will probably get a browser alert when running without cors middleware.
32
32
33
- #![ feature( async_await) ]
33
+ #![ feature( async_await, async_closure ) ]
34
34
#![ warn(
35
35
nonstandard_style,
36
36
rust_2018_idioms,
You can’t perform that action at this time.
0 commit comments