Skip to content

Commit

Permalink
Nits
Browse files Browse the repository at this point in the history
  • Loading branch information
thibault-martinez committed Dec 21, 2023
1 parent 316d83d commit 660300b
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions sdk/tests/types/address/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,13 @@ fn address_display_similar() {
rand_multi_address().into(),
rand_restricted_address().into(),
];
// restricted address is 72 length, the rest 64
// Restricted address is 72 length, the rest 64.
let regex_pattern = regex::Regex::new(r"^0x[0-9a-fA-F]{64,72}$").unwrap();

// Check if all addresses match the regex pattern
assert!(addresses.iter().all(|address| {
println!("{}", address);
regex_pattern.is_match(&format!("{}", address))
}));
// Check if all addresses match the regex pattern.
assert!(
addresses
.iter()
.all(|address| { regex_pattern.is_match(&address.to_string()) })
);
}

0 comments on commit 660300b

Please sign in to comment.