From dc02827184245392d3059bea150814d28d34a7fe Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Wed, 31 Mar 2021 13:10:41 -0600 Subject: expand pedantry level --- src/main.rs | 17 ++++++++++++++--- src/makefile/mod.rs | 2 +- 2 files changed, 15 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/main.rs b/src/main.rs index d560048..f96d39c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,13 +1,24 @@ #![warn( - unreachable_pub, unsafe_code, unused_crate_dependencies, variant_size_differences, clippy::pedantic, clippy::cargo, - clippy::nursery + clippy::nursery, + clippy::missing_docs_in_private_items, + clippy::str_to_string, + clippy::pattern_type_mismatch, + clippy::unwrap_used, + clippy::indexing_slicing, + clippy::panic_in_result_fn, + clippy::integer_arithmetic, + clippy::panic, + clippy::unwrap_in_result, + clippy::clone_on_ref_ptr, + clippy::unreachable, + clippy::todo )] -#![allow(clippy::redundant_pub_crate, clippy::non_ascii_literal)] +#![allow(clippy::non_ascii_literal)] use std::env::current_dir; use std::fs::metadata; diff --git a/src/makefile/mod.rs b/src/makefile/mod.rs index 7077161..c48c030 100644 --- a/src/makefile/mod.rs +++ b/src/makefile/mod.rs @@ -144,7 +144,7 @@ impl<'a> Makefile<'a> { let mut lines_iter = source .lines() .enumerate() - .map(|(number, line)| (number + 1, line)) + .map(|(number, line)| (number.saturating_add(1), line)) .map(|(line, x)| { ( line, -- cgit v1.2.3