From cb9dfc1b9421e9814dac3ba6c78bad0d271f9d67 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Sat, 9 Mar 2019 16:24:14 +0100 Subject: Obey clippy lints Closes #14 --- abnf_to_pest/src/lib.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'abnf_to_pest') diff --git a/abnf_to_pest/src/lib.rs b/abnf_to_pest/src/lib.rs index 8d858bb..72746c0 100644 --- a/abnf_to_pest/src/lib.rs +++ b/abnf_to_pest/src/lib.rs @@ -1,3 +1,4 @@ +#![allow(clippy::implicit_hasher, clippy::or_fun_call)] use itertools::Itertools; use std::collections::HashMap; @@ -16,7 +17,7 @@ impl Default for PestRuleSettings { } pub fn abnf_to_pest( - data: &Vec, + data: &[u8], rule_settings: &HashMap, ) -> std::io::Result { use abnf::abnf::*; @@ -123,7 +124,7 @@ pub fn abnf_to_pest( } } fn format_char(x: u64) -> String { - if x <= (u8::max_value() as u64) { + if x <= u64::from(u8::max_value()) { let x: u8 = x as u8; if x.is_ascii_graphic() { let x: char = x as char; -- cgit v1.2.3