aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMelody Horn <melody@boringcactus.com>2021-03-31 13:10:41 -0600
committerMelody Horn <melody@boringcactus.com>2021-03-31 13:10:41 -0600
commitdc02827184245392d3059bea150814d28d34a7fe (patch)
treeb3366e05e5860ba42f5accd0dc8d87104b8479c0
parente1a0584936b3aa5ce971e875dec750d2ae937d2e (diff)
downloadmakers-dc02827184245392d3059bea150814d28d34a7fe.tar.gz
makers-dc02827184245392d3059bea150814d28d34a7fe.zip
expand pedantry level
-rw-r--r--.clippy.toml2
-rw-r--r--src/main.rs17
-rw-r--r--src/makefile/mod.rs2
3 files changed, 15 insertions, 6 deletions
diff --git a/.clippy.toml b/.clippy.toml
index ffa12fc..bbd1605 100644
--- a/.clippy.toml
+++ b/.clippy.toml
@@ -1,6 +1,4 @@
disallowed-methods = [
- "core::option::Option::unwrap",
"core::option::Option::expect",
- "core::result::Result::unwrap",
"core::result::Result::expect",
]
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,