From fd9d27e082f5e9eea50e4fa9fa3a22060d02c66b Mon Sep 17 00:00:00 2001 From: Matt Ickstadt Date: Wed, 25 Jul 2018 12:20:48 -0500 Subject: [PATCH] rustfmt --- src/cmd/mod.rs | 2 +- src/cmd/serve.rs | 4 ++-- src/renderer/html_handlebars/hbs_renderer.rs | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/cmd/mod.rs b/src/cmd/mod.rs index df126fd1..c5b6730f 100644 --- a/src/cmd/mod.rs +++ b/src/cmd/mod.rs @@ -1,4 +1,4 @@ -/// Subcommand modules for the `mdbook` binary. +//! Subcommand modules for the `mdbook` binary. pub mod build; pub mod clean; diff --git a/src/cmd/serve.rs b/src/cmd/serve.rs index aab58a8f..22aa3ab9 100644 --- a/src/cmd/serve.rs +++ b/src/cmd/serve.rs @@ -5,13 +5,13 @@ extern crate ws; use self::iron::{ status, AfterMiddleware, Chain, Iron, IronError, IronResult, Request, Response, Set, }; +#[cfg(feature = "watch")] +use super::watch; use clap::{App, ArgMatches, SubCommand}; use mdbook::errors::*; use mdbook::utils; use mdbook::MDBook; use std; -#[cfg(feature = "watch")] -use super::watch; use {get_book_dir, open}; struct ErrorRecover; diff --git a/src/renderer/html_handlebars/hbs_renderer.rs b/src/renderer/html_handlebars/hbs_renderer.rs index 8949c393..2367446f 100644 --- a/src/renderer/html_handlebars/hbs_renderer.rs +++ b/src/renderer/html_handlebars/hbs_renderer.rs @@ -370,7 +370,8 @@ impl Renderer for HtmlHandlebars { .chain_err(|| "Unable to copy across additional CSS and JS")?; // Render search index - #[cfg(feature = "search")] { + #[cfg(feature = "search")] + { let search = html_config.search.unwrap_or_default(); if search.enable { super::search::create_files(&search, &destination, &book)?;