Skip to content

Commit 53fc9c6

Browse files
committed
Rollup merge of #58833 - Centril:rust_2018_idioms-rustbook, r=oli-obk
tools/rustbook: deny(rust_2018_idioms) r? @oli-obk
2 parents 1180df2 + 260b091 commit 53fc9c6

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/tools/rustbook/src/main.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
//
1+
#![deny(rust_2018_idioms)]
2+
23
use clap::{crate_version};
34

45
use std::env;
@@ -68,7 +69,7 @@ fn main() {
6869
}
6970

7071
// Build command implementation
71-
pub fn build_1(args: &ArgMatches) -> Result1<()> {
72+
pub fn build_1(args: &ArgMatches<'_>) -> Result1<()> {
7273
let book_dir = get_book_dir(args);
7374
let mut book = MDBook1::load(&book_dir)?;
7475

@@ -85,7 +86,7 @@ pub fn build_1(args: &ArgMatches) -> Result1<()> {
8586
}
8687

8788
// Build command implementation
88-
pub fn build_2(args: &ArgMatches) -> Result2<()> {
89+
pub fn build_2(args: &ArgMatches<'_>) -> Result2<()> {
8990
let book_dir = get_book_dir(args);
9091
let mut book = MDBook2::load(&book_dir)?;
9192

@@ -101,7 +102,7 @@ pub fn build_2(args: &ArgMatches) -> Result2<()> {
101102
Ok(())
102103
}
103104

104-
fn get_book_dir(args: &ArgMatches) -> PathBuf {
105+
fn get_book_dir(args: &ArgMatches<'_>) -> PathBuf {
105106
if let Some(dir) = args.value_of("dir") {
106107
// Check if path is relative from current dir, or absolute...
107108
let p = Path::new(dir);

0 commit comments

Comments
 (0)