Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
language: rust
rust: nightly-2019-07-31
rust: nightly-2019-08-21

before_script:
- >
Expand Down
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ hyper = ["http-service-hyper"]
[dependencies]
futures-preview = "0.3.0-alpha.17"
http = "0.1"
http-service = "0.3.0"
http-service-hyper = { version = "0.4.0", optional = true }
http-service = "0.3.1"
http-service-hyper = { version = "0.3.1", optional = true }
# Routing
fnv = "1.0.6"
route-recognizer = "0.1.13"
Expand All @@ -47,7 +47,7 @@ cookie = { version = "0.12", features = ["percent-encode"] }
env_logger = "0.6.1"
futures-fs = "0.0.5"
futures-util-preview = { version = "0.3.0-alpha.17", features = ["compat"] }
http-service-mock = "0.3.0"
http-service-mock = "0.3.1"
juniper = "0.13.0"
log = "0.4.6"
log4rs = "0.8.3"
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ Ecosystem WG, and **not ready for production use yet**.
**Hello World**

```rust,no_run
#![feature(async_await)]

fn main() -> Result<(), std::io::Error> {
let mut app = tide::App::new();
app.at("/").get(|_| async move { "Hello, world!" });
Expand Down
1 change: 0 additions & 1 deletion examples/body_types.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![feature(async_await)]
use serde::{Deserialize, Serialize};
use tide::{
error::ResultExt,
Expand Down
1 change: 0 additions & 1 deletion examples/catch_all.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![feature(async_await)]
use tide::Context;

async fn echo_path(cx: Context<()>) -> String {
Expand Down
1 change: 0 additions & 1 deletion examples/cookies.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![feature(async_await)]
use cookie::Cookie;
use tide::{cookies::ContextExt, middleware::CookiesMiddleware, Context};

Expand Down
2 changes: 0 additions & 2 deletions examples/cors.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![feature(async_await)]

use http::header::HeaderValue;
use tide::middleware::{CorsMiddleware, CorsOrigin};

Expand Down
2 changes: 0 additions & 2 deletions examples/default_headers.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![feature(async_await)]

use tide::middleware::DefaultHeaders;

fn main() {
Expand Down
1 change: 0 additions & 1 deletion examples/graphql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// a look at [the Juniper book].
//
// [the Juniper book]: https://graphql-rust.github.io/
#![feature(async_await)]
use http::status::StatusCode;
use juniper::graphql_object;
use std::sync::{atomic, Arc};
Expand Down
1 change: 0 additions & 1 deletion examples/hello.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![feature(async_await)]
fn main() {
let mut app = tide::App::new();
app.at("/").get(|_| async move { "Hello, world!" });
Expand Down
1 change: 0 additions & 1 deletion examples/hello_envlog.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![feature(async_await)]
fn main() {
env_logger::from_env(env_logger::Env::default().default_filter_or("info")).init();
let mut app = tide::App::new();
Expand Down
1 change: 0 additions & 1 deletion examples/hello_logrs.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![feature(async_await)]
fn main() {
use log::LevelFilter;
use log4rs::append::console::ConsoleAppender;
Expand Down
2 changes: 0 additions & 2 deletions examples/messages.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![feature(async_await)]

use http::status::StatusCode;
use serde::{Deserialize, Serialize};
use std::sync::Mutex;
Expand Down
1 change: 0 additions & 1 deletion examples/multipart_form/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![feature(async_await)]
use serde::{Deserialize, Serialize};
use std::io::Read;
use tide::{forms::ContextExt, response, App, Context, EndpointResult};
Expand Down
2 changes: 0 additions & 2 deletions examples/runtime.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![feature(async_await)]

/// An example of how to run a Tide service on top of `runtime`, this also shows the pieces
/// necessary if you wish to run a service on some other executor/IO source.

Expand Down
2 changes: 0 additions & 2 deletions examples/staticfile.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![feature(async_await)]

use bytes::Bytes;
use futures_fs::FsPool;
use futures_util::compat::*;
Expand Down
2 changes: 0 additions & 2 deletions examples/templating_tera.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![feature(async_await)]

use tera::{self, compile_templates};
use tide::{self, App, Context, EndpointResult, Error};

Expand Down
4 changes: 0 additions & 4 deletions rfcs/001-app-new.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ renamed to `Context::state`.

__no state__
```rust
#![feature(async_await)]

fn main() -> Result<(), failure::Error> {
let mut app = tide::App::new();
app.at("/").get(|_| async move { "Hello, world!" });
Expand All @@ -59,8 +57,6 @@ fn main() -> Result<(), failure::Error> {

__with state__
```rust
#![feature(async_await)]

#[derive(Default)]
struct State {
/* db connection goes here */
Expand Down
7 changes: 0 additions & 7 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ use crate::{
/// on `127.0.0.1:8000` with:
///
/// ```rust, no_run
/// #![feature(async_await)]
///
/// let mut app = tide::App::new();
/// app.at("/hello").get(|_| async move { "Hello, world!" });
/// app.run("127.0.0.1:8000");
Expand All @@ -45,8 +43,6 @@ use crate::{
/// segments as parameters to endpoints:
///
/// ```rust, no_run
/// #![feature(async_await)]
///
/// use tide::error::ResultExt;
///
/// async fn hello(cx: tide::Context<()>) -> tide::EndpointResult<String> {
Expand Down Expand Up @@ -75,8 +71,6 @@ use crate::{
/// # Application state
///
/// ```rust, no_run
/// #![feature(async_await)]
///
/// use http::status::StatusCode;
/// use serde::{Deserialize, Serialize};
/// use std::sync::Mutex;
Expand Down Expand Up @@ -166,7 +160,6 @@ impl<State: Send + Sync + 'static> App<State> {
/// respective endpoint of the selected resource. Example:
///
/// ```rust,no_run
/// # #![feature(async_await)]
/// # let mut app = tide::App::new();
/// app.at("/").get(|_| async move { "Hello, world!" });
/// ```
Expand Down
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

#![cfg_attr(any(feature = "nightly", test), feature(external_doc))]
#![cfg_attr(feature = "nightly", doc(include = "../README.md"))]
#![feature(async_await)]
#![warn(
nonstandard_style,
rust_2018_idioms,
Expand Down
2 changes: 0 additions & 2 deletions tests/head_response_empty_body.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![feature(async_await)]

use futures::executor::block_on;
use http_service::Body;
use http_service_mock::make_server;
Expand Down
2 changes: 0 additions & 2 deletions tests/wildcard.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![feature(async_await)]

use futures::executor::block_on;
use http_service::Body;
use http_service_mock::make_server;
Expand Down
4 changes: 2 additions & 2 deletions tide-compression/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ accept-encoding = "0.2.0-alpha.2"
bytes = "0.4.12"
futures-preview = "0.3.0-alpha.17"
http = "0.1"
http-service = "0.3.0"
http-service = "0.3.1"

[dependencies.async-compression]
default-features = false
Expand All @@ -28,4 +28,4 @@ version = "0.1.0-alpha.1"

[dev-dependencies]
tide = { path = "../", default-features = false }
http-service-mock = "0.3.0"
http-service-mock = "0.3.1"
1 change: 0 additions & 1 deletion tide-compression/examples/simple.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![feature(async_await)]
use tide::{App, Context};
use tide_compression::{Compression, Decompression, Encoding};

Expand Down
1 change: 0 additions & 1 deletion tide-compression/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

#![cfg_attr(feature = "nightly", feature(external_doc))]
#![cfg_attr(feature = "nightly", doc(include = "../README.md"))]
#![feature(async_await)]
#![warn(
nonstandard_style,
rust_2018_idioms,
Expand Down
4 changes: 2 additions & 2 deletions tide-cookies/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ repository = "https://github.com/rustasync/tide"
cookie = { version = "0.12", features = ["percent-encode"] }
futures-preview = "0.3.0-alpha.17"
http = "0.1"
http-service = "0.3.0"
http-service = "0.3.1"
tide-core = { path = "../tide-core", default-features = false }

[dev-dependencies]
tide = { path = "../", default-features = false }
http-service-mock = "0.3.0"
http-service-mock = "0.3.1"
1 change: 0 additions & 1 deletion tide-cookies/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//! Crate that provides helpers and/or middlewares for Tide
//! related to cookies.

#![feature(async_await)]
#![warn(
nonstandard_style,
rust_2018_idioms,
Expand Down
2 changes: 1 addition & 1 deletion tide-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ repository = "https://github.com/rustasync/tide"
[dependencies]
futures-preview = "0.3.0-alpha.17"
http = "0.1"
http-service = "0.3.0"
http-service = "0.3.1"
serde = "1.0.91"
serde_json = "1.0.39"
route-recognizer = "0.1.13"
Expand Down
5 changes: 1 addition & 4 deletions tide-core/src/endpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,11 @@ use crate::{error::Error, response::IntoResponse, Context, Response};
/// # Examples
///
/// Endpoints are implemented as asynchronous functions that make use of language features
/// currently only available in Rust Nightly. For this reason, we have to explicitly enable
/// those features with `#![feature(async_await)]`. To keep examples concise,
/// the attribute will be omitted in most of the documentation.
/// currently only available in Rust Nightly.
///
/// A simple endpoint that is invoked on a `GET` request and returns a `String`:
///
/// ```rust, no_run
/// # #![feature(async_await)]
/// async fn hello(_cx: tide::Context<()>) -> String {
/// String::from("hello")
/// }
Expand Down
1 change: 0 additions & 1 deletion tide-core/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//! Core types and traits from Tide

#![feature(async_await)]
#![warn(
nonstandard_style,
rust_2018_idioms,
Expand Down
4 changes: 2 additions & 2 deletions tide-cors/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ edition = "2018"
[dependencies]
futures-preview = "0.3.0-alpha.17"
http = "0.1"
http-service = "0.3.0"
http-service = "0.3.1"
tide-core = { path = "../tide-core" }

[dev-dependencies]
tide = { path = "../" }
http-service-mock = "0.3.0"
http-service-mock = "0.3.1"
2 changes: 0 additions & 2 deletions tide-cors/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ This crate provides cors-related middleware for Tide.
Examples are in the `/examples` folder of this crate.

```rust,no_run
#![feature(async_await)]

use http::header::HeaderValue;
use tide::middleware::CorsMiddleware;

Expand Down
3 changes: 0 additions & 3 deletions tide-cors/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
//! ## Examples
//!
//! ```rust,no_run
//! #![feature(async_await)]
//!
//! use http::header::HeaderValue;
//! use tide::middleware::{CorsMiddleware, CorsOrigin};
//!
Expand All @@ -30,7 +28,6 @@
//!
//! You will probably get a browser alert when running without cors middleware.

#![feature(async_await)]
#![warn(
nonstandard_style,
rust_2018_idioms,
Expand Down
2 changes: 1 addition & 1 deletion tide-forms/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ version = "0.1.0"

[dependencies]
tide-core = { path = "../tide-core", default-features = false }
http-service = "0.3.0"
http-service = "0.3.1"
futures-preview = "0.3.0-alpha.17"
http = "0.1"
log = "0.4.6"
Expand Down
1 change: 0 additions & 1 deletion tide-forms/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//! Crate that provides helpers and extensions for Tide
//! related to forms.

#![feature(async_await)]
#![warn(
nonstandard_style,
rust_2018_idioms,
Expand Down
1 change: 0 additions & 1 deletion tide-headers/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//! Crate that provides helpers and/or middlewares for Tide
//! related to http headers.

#![feature(async_await)]
#![warn(
nonstandard_style,
rust_2018_idioms,
Expand Down
1 change: 0 additions & 1 deletion tide-log/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//! Crate that provides helpers and/or middlewares for Tide
//! related to logging.

#![feature(async_await)]
#![warn(
nonstandard_style,
rust_2018_idioms,
Expand Down
2 changes: 1 addition & 1 deletion tide-panic/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ repository = "https://github.com/rustasync/tide"
[dependencies]
futures-preview = "0.3.0-alpha.17"
http = "0.1"
http-service = "0.2.0"
http-service = "0.3.1"
tide-core = { path = "../tide-core" }
2 changes: 1 addition & 1 deletion tide-panic/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//! Tide's default panic handling is not usable by your application. Before using these you should
//! have a good understanding of how the different components involved in [`std::panic`] works.

#![feature(async_await, doc_cfg)]
#![feature(doc_cfg)]
#![warn(
nonstandard_style,
rust_2018_idioms,
Expand Down
4 changes: 2 additions & 2 deletions tide-querystring/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ serde_qs = "0.5.0"

[dev-dependencies]
tide = { path = "../", default-features = false }
http-service = "0.3.0"
http-service-mock = "0.3.0"
http-service = "0.3.1"
http-service-mock = "0.3.1"
3 changes: 0 additions & 3 deletions tide-querystring/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//! Crate that provides helpers and extensions for Tide
//! related to query strings.

#![feature(async_await)]
#![warn(
nonstandard_style,
rust_2018_idioms,
Expand All @@ -20,8 +19,6 @@ use tide_core::{error::Error, Context};
/// Turning the query parameters into a `HashMap`:
///
/// ```
/// #![feature(async_await)]
///
/// # use std::collections::HashMap;
/// use tide::querystring::ContextExt;
///
Expand Down
1 change: 0 additions & 1 deletion tide-slog/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
//! related to structured logging with slog.

#![cfg_attr(docrs, feature(doc_cfg))]
#![feature(async_await)]
#![warn(
nonstandard_style,
rust_2018_idioms,
Expand Down