diff options
author | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2019-07-22 22:07:17 +0200 |
---|---|---|
committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2019-07-22 23:31:01 +0200 |
commit | 5b9c3ca4acb701ea5e5f2431e3ee20057137d8fe (patch) | |
tree | 2393381610324529e25a6fba39821640f3cb15f0 | |
parent | 5a4ac0fe462faf2a3ba3b3f4334863cdb4bbf45a (diff) | |
download | askama-5b9c3ca4acb701ea5e5f2431e3ee20057137d8fe.tar.gz askama-5b9c3ca4acb701ea5e5f2431e3ee20057137d8fe.tar.bz2 askama-5b9c3ca4acb701ea5e5f2431e3ee20057137d8fe.zip |
Remove usage of extern crate in nested modules
Diffstat (limited to '')
-rw-r--r-- | askama/src/lib.rs | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/askama/src/lib.rs b/askama/src/lib.rs index 5729e2c..498d204 100644 --- a/askama/src/lib.rs +++ b/askama/src/lib.rs @@ -513,22 +513,19 @@ pub use askama_derive::*; #[cfg(feature = "with-iron")] pub mod iron { - extern crate iron; - pub use self::iron::headers::ContentType; - pub use self::iron::modifier::Modifier; - pub use self::iron::response::Response; + pub use iron::headers::ContentType; + pub use iron::modifier::Modifier; + pub use iron::response::Response; } #[cfg(feature = "with-rocket")] pub mod rocket { - extern crate rocket; - - use self::rocket::http::{ContentType, Status}; - pub use self::rocket::request::Request; - use self::rocket::response::Response; + use rocket::http::{ContentType, Status}; + pub use rocket::request::Request; + use rocket::response::Response; use std::io::Cursor; - pub use self::rocket::response::{Responder, Result}; + pub use rocket::response::{Responder, Result}; pub fn respond<T: super::Template>(t: &T, ext: &str) -> Result<'static> { let rsp = t.render().map_err(|_| Status::InternalServerError)?; @@ -569,9 +566,9 @@ const TEXT_TYPES: [(mime_guess::Mime, mime_guess::Mime); 6] = [ #[cfg(feature = "with-actix-web")] pub mod actix_web { - extern crate actix_web; - extern crate bytes; - extern crate mime_guess; + use actix_web; + use bytes; + use mime_guess; use std::fmt; |