refactor: replace macro_use with explicit use declarations

This commit is contained in:
Philipp Matthias Schaefer 2021-02-25 20:05:52 +01:00
parent ba1917c9b1
commit a6c7df0cb0
4 changed files with 9 additions and 6 deletions

View File

@ -3,6 +3,9 @@ use ldap3::exop::PasswordModify;
use ldap3::result::{LdapError, Result}; use ldap3::result::{LdapError, Result};
use rocket_contrib::json::Json; use rocket_contrib::json::Json;
use rocket::post;
use serde_derive::{Deserialize, Serialize};
use crate::config::Config; use crate::config::Config;
#[derive(Deserialize)] #[derive(Deserialize)]

View File

@ -2,6 +2,8 @@ use std::io::BufReader;
use std::fs::File; use std::fs::File;
use handlebars::Handlebars; use handlebars::Handlebars;
use serde_derive::Deserialize;
use serde_json::json;
use crate::exit::exit_with_error; use crate::exit::exit_with_error;

View File

@ -1,16 +1,12 @@
#![feature(proc_macro_hygiene, decl_macro)] #![feature(proc_macro_hygiene, decl_macro)]
#[macro_use] extern crate clap;
#[macro_use] extern crate rocket;
#[macro_use] extern crate serde_derive;
#[macro_use] extern crate serde_json;
mod api; mod api;
mod config; mod config;
mod exit; mod exit;
mod r#static; mod r#static;
use clap::{Arg, App}; use clap::{Arg, App, crate_version};
use rocket::routes;
use rocket::config::{Config, Environment}; use rocket::config::{Config, Environment};
use crate::config::load_config; use crate::config::load_config;

View File

@ -2,6 +2,8 @@ use rocket::http::{ContentType, Status};
use rocket::request::Request; use rocket::request::Request;
use rocket::response::{content, Responder, Response}; use rocket::response::{content, Responder, Response};
use rocket::get;
pub struct Svg<R>(pub R); pub struct Svg<R>(pub R);
impl<'r, R: Responder<'r>> Responder<'r> for Svg<R> { impl<'r, R: Responder<'r>> Responder<'r> for Svg<R> {