about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2019-03-02 14:55:22 +0800
committerkennytm <kennytm@gmail.com>2019-03-02 22:58:40 +0800
commit53fc9c6bfa3ee0810d4aebfe19ddea0ffbbb547a (patch)
treecf1222b81ee61f823aa28361a68c50295f79621a /src
parent1180df2a3beb0059f21cbbef5228b56f1f2153df (diff)
parent260b0917b074b00960672a5308edee5c023e44f4 (diff)
downloadrust-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.rs9
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);