Skip to content

Commit

Permalink
Rollup merge of rust-lang#44313 - RalfJung:book, r=nikomatsakis
Browse files Browse the repository at this point in the history
rustbook: remove dead test functions

There is no "test" subcommand added to the `clap::App`, so this is all dead code.

Cc @steveklabnik -- your [commit](RalfJung@a076961) introducing this stated the intention of having both commands, but it seems nobody has missed the `test` command since February.
  • Loading branch information
Mark-Simulacrum committed Sep 7, 2017
2 parents 923c351 + adbb820 commit 50f14e9
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/tools/rustbook/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ fn main() {
// Check which subcomamnd the user ran...
let res = match matches.subcommand() {
("build", Some(sub_matches)) => build(sub_matches),
("test", Some(sub_matches)) => test(sub_matches),
(_, _) => unreachable!(),
};

Expand All @@ -65,14 +64,6 @@ fn build(args: &ArgMatches) -> Result<(), Box<Error>> {
Ok(())
}

fn test(args: &ArgMatches) -> Result<(), Box<Error>> {
let mut book = build_mdbook_struct(args);

try!(book.test());

Ok(())
}

fn build_mdbook_struct(args: &ArgMatches) -> mdbook::MDBook {
let book_dir = get_book_dir(args);
let mut book = MDBook::new(&book_dir).read_config();
Expand Down

0 comments on commit 50f14e9

Please sign in to comment.