Skip to content

Commit

Permalink
Update to nightly-2019-02-27 and make it default (#146)
Browse files Browse the repository at this point in the history
* Update to nightly-2019-03-05 and make it default

* Run rustfmt

* Rollback to nightly-2019-03-02 due to ICE

* Rollback to nightly-2019-02-27 that has clippy

* Let travis setup script install pinned nightly version
  • Loading branch information
tirr-c authored and yoshuawuyts committed Mar 6, 2019
1 parent 70ed8aa commit 7e87e4e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
language: rust
rust:
- nightly
- nightly-2019-02-27

before_script: |
rustup install nightly-2019-02-21
rustup component add rustfmt-preview clippy-preview
rustup component add rustfmt clippy
script: |
cargo fmt --all -- --check &&
cargo clippy --all -- -D clippy::all &&
Expand Down
16 changes: 7 additions & 9 deletions tests/wildcard.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
#![feature(futures_api, async_await)]

use http_service::{Body};
use futures::{executor::block_on};
use tide::{
head::{Named, NamedSegment}
};
use http_service_mock::{make_server};
use futures::executor::block_on;
use http_service::Body;
use http_service_mock::make_server;
use tide::head::{Named, NamedSegment};

struct Number(i32);

Expand All @@ -27,7 +25,7 @@ async fn add_one(Named(Number(num)): Named<Number>) -> String {
#[test]
fn wildcard() {
let mut app = tide::App::new(());
app.at("/add_one/{num}").get(add_one);
app.at("/add_one/{num}").get(add_one);
let mut server = make_server(app.into_http_service()).unwrap();

let req = http::Request::get("/add_one/3")
Expand All @@ -50,7 +48,7 @@ fn wildcard() {
#[test]
fn invalid_segment_error() {
let mut app = tide::App::new(());
app.at("/add_one/{num}").get(add_one);
app.at("/add_one/{num}").get(add_one);
let mut server = make_server(app.into_http_service()).unwrap();

let req = http::Request::get("/add_one/a")
Expand All @@ -63,7 +61,7 @@ fn invalid_segment_error() {
#[test]
fn not_found_error() {
let mut app = tide::App::new(());
app.at("/add_one/{num}").get(add_one);
app.at("/add_one/{num}").get(add_one);
let mut server = make_server(app.into_http_service()).unwrap();

let req = http::Request::get("/add_one/").body(Body::empty()).unwrap();
Expand Down

0 comments on commit 7e87e4e

Please sign in to comment.