diff options
| author | kennytm <kennytm@gmail.com> | 2019-03-02 14:55:22 +0800 |
|---|---|---|
| committer | kennytm <kennytm@gmail.com> | 2019-03-02 22:58:40 +0800 |
| commit | 53fc9c6bfa3ee0810d4aebfe19ddea0ffbbb547a (patch) | |
| tree | cf1222b81ee61f823aa28361a68c50295f79621a /src | |
| parent | 1180df2a3beb0059f21cbbef5228b56f1f2153df (diff) | |
| parent | 260b0917b074b00960672a5308edee5c023e44f4 (diff) | |
| download | rust-53fc9c6bfa3ee0810d4aebfe19ddea0ffbbb547a.tar.gz rust-53fc9c6bfa3ee0810d4aebfe19ddea0ffbbb547a.zip | |
Rollup merge of #58833 - Centril:rust_2018_idioms-rustbook, r=oli-obk
tools/rustbook: deny(rust_2018_idioms) r? @oli-obk
Diffstat (limited to 'src')
| -rw-r--r-- | src/tools/rustbook/src/main.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/tools/rustbook/src/main.rs b/src/tools/rustbook/src/main.rs index 5a6246347cc..cfc1bc6d414 100644 --- a/src/tools/rustbook/src/main.rs +++ b/src/tools/rustbook/src/main.rs @@ -1,4 +1,5 @@ -// +#![deny(rust_2018_idioms)] + use clap::{crate_version}; use std::env; @@ -68,7 +69,7 @@ fn main() { } // Build command implementation -pub fn build_1(args: &ArgMatches) -> Result1<()> { +pub fn build_1(args: &ArgMatches<'_>) -> Result1<()> { let book_dir = get_book_dir(args); let mut book = MDBook1::load(&book_dir)?; @@ -85,7 +86,7 @@ pub fn build_1(args: &ArgMatches) -> Result1<()> { } // Build command implementation -pub fn build_2(args: &ArgMatches) -> Result2<()> { +pub fn build_2(args: &ArgMatches<'_>) -> Result2<()> { let book_dir = get_book_dir(args); let mut book = MDBook2::load(&book_dir)?; @@ -101,7 +102,7 @@ pub fn build_2(args: &ArgMatches) -> Result2<()> { Ok(()) } -fn get_book_dir(args: &ArgMatches) -> PathBuf { +fn get_book_dir(args: &ArgMatches<'_>) -> PathBuf { if let Some(dir) = args.value_of("dir") { // Check if path is relative from current dir, or absolute... let p = Path::new(dir); |
