File tree Expand file tree Collapse file tree 12 files changed +16
-16
lines changed Expand file tree Collapse file tree 12 files changed +16
-16
lines changed Original file line number Diff line number Diff line change 11language : rust
2- rust : nightly-2019-06-02
2+ rust : nightly-2019-07-08
33cache : cargo
44
55before_script :
Original file line number Diff line number Diff line change 1- #![ feature( async_await) ]
1+ #![ feature( async_await, async_closure ) ]
22
33use http:: header:: HeaderValue ;
44use tide:: middleware:: CorsMiddleware ;
Original file line number Diff line number Diff line change 1- #![ feature( async_await) ]
1+ #![ feature( async_await, async_closure ) ]
22
33use tide:: middleware:: DefaultHeaders ;
44
Original file line number Diff line number Diff line change 1- #![ feature( async_await) ]
1+ #![ feature( async_await, async_closure ) ]
22fn main ( ) {
33 let mut app = tide:: App :: new ( ) ;
44 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 ) ]
22fn main ( ) {
33 env_logger:: from_env ( env_logger:: Env :: default ( ) . default_filter_or ( "info" ) ) . init ( ) ;
44 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 ) ]
22fn main ( ) {
33 use log:: LevelFilter ;
44 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<()> {
5151 if cx. state ( ) . set ( id, msg) {
5252 Ok ( ( ) )
5353 } else {
54- Err ( StatusCode :: NOT_FOUND ) ?
54+ Err ( StatusCode :: NOT_FOUND . into ( ) )
5555 }
5656}
5757
@@ -60,7 +60,7 @@ async fn get_message(cx: Context<Database>) -> EndpointResult {
6060 if let Some ( msg) = cx. state ( ) . get ( id) {
6161 Ok ( response:: json ( msg) )
6262 } else {
63- Err ( StatusCode :: NOT_FOUND ) ?
63+ Err ( StatusCode :: NOT_FOUND . into ( ) )
6464 }
6565}
6666
Original file line number Diff line number Diff line change 1- #![ feature( async_await) ]
1+ #![ feature( async_await, async_closure ) ]
22
33/// An example of how to run a Tide service on top of `runtime`, this also shows the pieces
44/// 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::{
3030/// on `127.0.0.1:8000` with:
3131///
3232/// ```rust, no_run
33- /// #![feature(async_await)]
33+ /// #![feature(async_await, async_closure )]
3434///
3535/// let mut app = tide::App::new();
3636/// app.at("/hello").get(async move |_| "Hello, world!");
@@ -45,7 +45,7 @@ use crate::{
4545/// segments as parameters to endpoints:
4646///
4747/// ```rust, no_run
48- /// #![feature(async_await)]
48+ /// #![feature(async_await, async_closure )]
4949///
5050/// use tide::error::ResultExt;
5151///
@@ -166,7 +166,7 @@ impl<State: Send + Sync + 'static> App<State> {
166166 /// respective endpoint of the selected resource. Example:
167167 ///
168168 /// ```rust,no_run
169- /// # #![feature(async_await)]
169+ /// # #![feature(async_await, async_closure )]
170170 /// # let mut app = tide::App::new();
171171 /// app.at("/").get(async move |_| "Hello, world!");
172172 /// ```
Original file line number Diff line number Diff line change 44
55#![ cfg_attr( any( feature = "nightly" , test) , feature( external_doc) ) ]
66#![ cfg_attr( feature = "nightly" , doc( include = "../README.md" ) ) ]
7- #![ feature( async_await, existential_type) ]
7+ #![ feature( async_await, async_closure , existential_type) ]
88#![ warn(
99 nonstandard_style,
1010 rust_2018_idioms,
You can’t perform that action at this time.
0 commit comments