summaryrefslogtreecommitdiff
path: root/abnf_to_pest
diff options
context:
space:
mode:
Diffstat (limited to 'abnf_to_pest')
-rw-r--r--abnf_to_pest/src/lib.rs5
1 files changed, 3 insertions, 2 deletions
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<u8>,
+ data: &[u8],
rule_settings: &HashMap<String, PestRuleSettings>,
) -> std::io::Result<String> {
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;