Refactor: Move extern crate definitions to lib.rs
This commit is contained in:
parent
925939e267
commit
15d26befcc
|
@ -1,5 +1,4 @@
|
|||
extern crate rustc_serialize;
|
||||
use self::rustc_serialize::json::Json;
|
||||
use rustc_serialize::json::Json;
|
||||
use std::fs::File;
|
||||
use std::io::Read;
|
||||
use std::path::{Path, PathBuf};
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
extern crate rustc_serialize;
|
||||
|
||||
use self::rustc_serialize::json::{Json, ToJson};
|
||||
use rustc_serialize::json::{Json, ToJson};
|
||||
use std::path::PathBuf;
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
|
|
|
@ -69,8 +69,11 @@
|
|||
//!
|
||||
//! Make sure to take a look at it.
|
||||
|
||||
#[macro_use]
|
||||
pub mod macros;
|
||||
extern crate rustc_serialize;
|
||||
extern crate handlebars;
|
||||
extern crate pulldown_cmark;
|
||||
|
||||
#[macro_use] pub mod macros;
|
||||
pub mod book;
|
||||
mod parse;
|
||||
pub mod renderer;
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
extern crate handlebars;
|
||||
extern crate rustc_serialize;
|
||||
|
||||
use renderer::html_handlebars::helpers;
|
||||
use renderer::Renderer;
|
||||
use book::MDBook;
|
||||
|
@ -13,8 +10,8 @@ use std::error::Error;
|
|||
use std::io::{self, Read, Write};
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
use self::handlebars::{Handlebars, JsonRender};
|
||||
use self::rustc_serialize::json::{Json, ToJson};
|
||||
use handlebars::{Handlebars, JsonRender};
|
||||
use rustc_serialize::json::{Json, ToJson};
|
||||
|
||||
|
||||
pub struct HtmlHandlebars;
|
||||
|
|
|
@ -1,11 +1,8 @@
|
|||
extern crate handlebars;
|
||||
extern crate rustc_serialize;
|
||||
|
||||
use std::path::Path;
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
use self::rustc_serialize::json::{self, ToJson};
|
||||
use self::handlebars::{Handlebars, RenderError, RenderContext, Helper, Context, Renderable};
|
||||
use rustc_serialize::json::{self, ToJson};
|
||||
use handlebars::{Handlebars, RenderError, RenderContext, Helper, Context, Renderable};
|
||||
|
||||
// Handlebars helper for navigation
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
extern crate handlebars;
|
||||
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::fs::File;
|
||||
use std::io::Read;
|
||||
|
|
|
@ -1,13 +1,9 @@
|
|||
extern crate handlebars;
|
||||
extern crate rustc_serialize;
|
||||
extern crate pulldown_cmark;
|
||||
|
||||
use std::path::Path;
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
use self::rustc_serialize::json;
|
||||
use self::handlebars::{Handlebars, HelperDef, RenderError, RenderContext, Helper, Context};
|
||||
use self::pulldown_cmark::{Parser, html, Event, Tag};
|
||||
use rustc_serialize::json;
|
||||
use handlebars::{Handlebars, HelperDef, RenderError, RenderContext, Helper, Context};
|
||||
use pulldown_cmark::{Parser, html, Event, Tag};
|
||||
|
||||
// Handlebars helper to construct TOC
|
||||
#[derive(Clone, Copy)]
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
extern crate pulldown_cmark;
|
||||
|
||||
pub mod fs;
|
||||
|
||||
use self::pulldown_cmark::{Parser, html, Options, OPTION_ENABLE_TABLES, OPTION_ENABLE_FOOTNOTES};
|
||||
|
||||
use pulldown_cmark::{Parser, html, Options, OPTION_ENABLE_TABLES, OPTION_ENABLE_FOOTNOTES};
|
||||
|
||||
|
||||
///
|
||||
|
|
Loading…
Reference in New Issue