From 5549f9a3cd94e3cd6700067b1c74194dadb58a0f Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Fri, 7 Dec 2018 15:52:26 +0100 Subject: Use 2018 edition idioms --- testing/benches/all.rs | 1 - testing/build.rs | 2 +- testing/tests/actix_web.rs | 4 ---- testing/tests/filters.rs | 3 +-- testing/tests/hello.rs | 2 -- testing/tests/include.rs | 2 -- testing/tests/inheritance.rs | 2 -- testing/tests/iron.rs | 3 --- testing/tests/loops.rs | 2 -- testing/tests/macro.rs | 2 -- testing/tests/matches.rs | 2 -- testing/tests/methods.rs | 2 -- testing/tests/operators.rs | 2 -- testing/tests/rocket.rs | 1 - testing/tests/rust_macro.rs | 2 -- testing/tests/simple.rs | 2 -- testing/tests/vars.rs | 2 -- 17 files changed, 2 insertions(+), 34 deletions(-) (limited to 'testing') diff --git a/testing/benches/all.rs b/testing/benches/all.rs index ff9d248..3ce0812 100644 --- a/testing/benches/all.rs +++ b/testing/benches/all.rs @@ -1,4 +1,3 @@ -extern crate askama; #[macro_use] extern crate criterion; diff --git a/testing/build.rs b/testing/build.rs index 89e3e6b..aab2d59 100644 --- a/testing/build.rs +++ b/testing/build.rs @@ -1,4 +1,4 @@ -extern crate askama; +use askama; fn main() { askama::rerun_if_templates_changed(); diff --git a/testing/tests/actix_web.rs b/testing/tests/actix_web.rs index 880f907..d40830f 100644 --- a/testing/tests/actix_web.rs +++ b/testing/tests/actix_web.rs @@ -1,8 +1,4 @@ #![cfg(feature = "actix")] -extern crate actix_web; -extern crate askama; -extern crate bytes; - use actix_web::http::header::CONTENT_TYPE; use actix_web::test; use actix_web::HttpMessage; diff --git a/testing/tests/filters.rs b/testing/tests/filters.rs index 15ce789..4579afe 100644 --- a/testing/tests/filters.rs +++ b/testing/tests/filters.rs @@ -1,4 +1,3 @@ -extern crate askama; #[cfg(feature = "serde-json")] #[macro_use] extern crate serde_json; @@ -48,7 +47,7 @@ mod filters { Ok(s.replace("oo", "aa").to_string()) } // for test_nested_filter_ref - pub fn mytrim(s: &::std::fmt::Display) -> ::askama::Result { + pub fn mytrim(s: &dyn (::std::fmt::Display)) -> ::askama::Result { let s = format!("{}", s); Ok(s.trim().to_owned()) } diff --git a/testing/tests/hello.rs b/testing/tests/hello.rs index ce73ff5..bfb71b1 100644 --- a/testing/tests/hello.rs +++ b/testing/tests/hello.rs @@ -1,5 +1,3 @@ -extern crate askama; - use askama::Template; #[derive(Template)] // this will generate the code... diff --git a/testing/tests/include.rs b/testing/tests/include.rs index 8e6773b..f461a7b 100644 --- a/testing/tests/include.rs +++ b/testing/tests/include.rs @@ -1,5 +1,3 @@ -extern crate askama; - use askama::Template; #[derive(Template)] diff --git a/testing/tests/inheritance.rs b/testing/tests/inheritance.rs index 5a5cf0e..35fee80 100644 --- a/testing/tests/inheritance.rs +++ b/testing/tests/inheritance.rs @@ -1,5 +1,3 @@ -extern crate askama; - use askama::Template; #[derive(Template)] diff --git a/testing/tests/iron.rs b/testing/tests/iron.rs index a385225..f58a609 100644 --- a/testing/tests/iron.rs +++ b/testing/tests/iron.rs @@ -1,7 +1,4 @@ #![cfg(feature = "iron")] -extern crate askama; -extern crate iron; - use askama::Template; use iron::{status, Response}; diff --git a/testing/tests/loops.rs b/testing/tests/loops.rs index 647c9ca..3dfad38 100644 --- a/testing/tests/loops.rs +++ b/testing/tests/loops.rs @@ -1,5 +1,3 @@ -extern crate askama; - use askama::Template; #[derive(Template)] diff --git a/testing/tests/macro.rs b/testing/tests/macro.rs index 42bcc99..51fbcdc 100644 --- a/testing/tests/macro.rs +++ b/testing/tests/macro.rs @@ -1,5 +1,3 @@ -extern crate askama; - use askama::Template; #[derive(Template)] diff --git a/testing/tests/matches.rs b/testing/tests/matches.rs index 64e8f40..89082ef 100644 --- a/testing/tests/matches.rs +++ b/testing/tests/matches.rs @@ -1,5 +1,3 @@ -extern crate askama; - use askama::Template; #[derive(Template)] diff --git a/testing/tests/methods.rs b/testing/tests/methods.rs index 41117e5..d24000e 100644 --- a/testing/tests/methods.rs +++ b/testing/tests/methods.rs @@ -1,5 +1,3 @@ -extern crate askama; - use askama::Template; #[derive(Template)] diff --git a/testing/tests/operators.rs b/testing/tests/operators.rs index 91db57d..d6c3cae 100644 --- a/testing/tests/operators.rs +++ b/testing/tests/operators.rs @@ -1,5 +1,3 @@ -extern crate askama; - use askama::Template; #[derive(Template)] diff --git a/testing/tests/rocket.rs b/testing/tests/rocket.rs index 2d1251a..3dbc357 100644 --- a/testing/tests/rocket.rs +++ b/testing/tests/rocket.rs @@ -1,7 +1,6 @@ #![cfg(feature = "with-rocket")] #![feature(proc_macro_hygiene, decl_macro)] -extern crate askama; #[macro_use] extern crate rocket; diff --git a/testing/tests/rust_macro.rs b/testing/tests/rust_macro.rs index 76ecbad..8a114f9 100644 --- a/testing/tests/rust_macro.rs +++ b/testing/tests/rust_macro.rs @@ -1,5 +1,3 @@ -extern crate askama; - use askama::Template; macro_rules! hello { diff --git a/testing/tests/simple.rs b/testing/tests/simple.rs index e4473fa..f192609 100644 --- a/testing/tests/simple.rs +++ b/testing/tests/simple.rs @@ -1,5 +1,3 @@ -extern crate askama; - use askama::Template; use std::collections::HashMap; diff --git a/testing/tests/vars.rs b/testing/tests/vars.rs index 5ec343c..87af3f6 100644 --- a/testing/tests/vars.rs +++ b/testing/tests/vars.rs @@ -1,5 +1,3 @@ -extern crate askama; - use askama::Template; #[derive(Template)] -- cgit