Skip to content

Commit

Permalink
chore: move allow blocks to functions
Browse files Browse the repository at this point in the history
  • Loading branch information
NishantJoshi00 committed Nov 10, 2023
1 parent 250ebfa commit 379ad8a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/validations.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#![allow(clippy::expect_used)]
#![allow(clippy::as_conversions)]

///
/// Maximum limit of a card number will not exceed 19 by ISO standards
///
const CARD_NUMBER_LENGTH: usize = 20;

#[allow(clippy::expect_used)]
///
/// # Panics
///
Expand All @@ -27,6 +26,7 @@ pub fn luhn_on_string(number: &str) -> bool {
.unwrap_or(false)
}

#[allow(clippy::as_conversions)]
pub fn luhn(number: &[u8]) -> bool {
number
.iter()
Expand Down

0 comments on commit 379ad8a

Please sign in to comment.