From 2e4b929fb5873dafabf4d7ba07859a7b94a83576 Mon Sep 17 00:00:00 2001 From: Gunwant Jain Date: Thu, 21 Jan 2021 16:34:59 +0530 Subject: [PATCH] `cargo fix` the project Make use of clippy and rustfmt Signed-off-by: Gunwant Jain --- src/main.rs | 41 +++++++++++++++++++++++++++-------------- src/paste_id.rs | 4 ++-- 2 files changed, 29 insertions(+), 16 deletions(-) diff --git a/src/main.rs b/src/main.rs index a20292b..2bf734d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,19 +1,20 @@ #![feature(proc_macro_hygiene, decl_macro)] -#[macro_use] extern crate rocket; +#[macro_use] +extern crate rocket; extern crate tree_magic; -use std::env; -use std::io::prelude::*; use std::collections::HashMap; -use std::path::Path; +use std::env; use std::fs; use std::fs::File; +use std::io::prelude::*; +use std::path::Path; -use rocket_contrib::templates::Template; use rocket::request::Form; use rocket::response::Redirect; use rocket::Data; +use rocket_contrib::templates::Template; mod paste_id; @@ -36,8 +37,8 @@ fn pretty_retrieve(id: PasteId) -> Option