Skip to content

Commit

Permalink
Ignore clippy warning when length must be >= 1
Browse files Browse the repository at this point in the history
Fixes: #120
  • Loading branch information
WhyNotHugo committed Sep 29, 2023
1 parent d8dd37e commit 2592921
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions xsd-parser/src/generator/validator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ fn gen_min_length_validation(value: &str, name: &str) -> String {

format!(
r#"
#[allow(clippy::len_zero)]
if self.{name}.len() < {value} {{
return Err(format!("MinLength validation error. \nExpected: {name} length >= {value} \nActual: {name} length == {{}}", self.{name}.len()));
}}"#,
Expand Down

0 comments on commit 2592921

Please sign in to comment.