Skip to content

Commit

Permalink
rename to idx
Browse files Browse the repository at this point in the history
  • Loading branch information
DSharifi committed Jan 24, 2025
1 parent bc1c252 commit 3cdd1ee
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/server_name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -330,9 +330,9 @@ const fn validate(input: &[u8]) -> Result<(), InvalidDnsNameError> {
return Err(InvalidDnsNameError);
}

let mut character_index = 0;
while character_index < input.len() {
let ch = input[character_index];
let mut idx = 0;
while idx < input.len() {
let ch = input[idx];
state = match (state, ch) {
(Start | Next | NextAfterNumericOnly | Hyphen { .. }, b'.') => {
return Err(InvalidDnsNameError)
Expand All @@ -358,7 +358,7 @@ const fn validate(input: &[u8]) -> Result<(), InvalidDnsNameError> {
) => Subsequent { len: len + 1 },
_ => return Err(InvalidDnsNameError),
};
character_index += 1;
idx += 1;
}

if matches!(
Expand Down

0 comments on commit 3cdd1ee

Please sign in to comment.