From f6033128292bbd5838a6585a1214bc6c9275de38 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Sat, 30 Dec 2017 00:09:53 +0100 Subject: Order and cosmetics on extern crate declarations. --- src/lib.rs | 13 +++++-------- src/main.rs | 9 +++++---- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index b05ec3a..ec821e6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,20 +1,17 @@ #![feature(plugin, custom_derive)] #![plugin(rocket_codegen)] -#[macro_use] -extern crate diesel_codegen; -pub mod models; -pub mod schema; +#[macro_use] extern crate diesel_codegen; +#[macro_use] extern crate diesel; +#[macro_use] extern crate serde_derive; -#[macro_use] -extern crate diesel; extern crate dotenv; extern crate r2d2_diesel; extern crate r2d2; extern crate rocket; -#[macro_use] -extern crate serde_derive; +pub mod models; +pub mod schema; use diesel::pg::PgConnection; use r2d2_diesel::ConnectionManager; diff --git a/src/main.rs b/src/main.rs index fe8bcab..40fa802 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,14 +1,15 @@ #![feature(plugin)] #![plugin(rocket_codegen)] -extern crate diesel; -extern crate rocket; #[macro_use] extern crate rocket_blog; -extern crate rocket_contrib; #[macro_use] extern crate bart_derive; #[macro_use] extern crate serde_derive; -use self::rocket_blog::models; +extern crate diesel; +extern crate rocket; +extern crate rocket_contrib; + +use rocket_blog::models; use rocket_contrib::Json; mod posts; -- cgit v1.2.3