Use associated items of char
instead of freestanding items in core::char
This commit is contained in:
parent
c0b8735959
commit
76e216f29b
12 changed files with 21 additions and 45 deletions
|
@ -2,9 +2,8 @@ use super::*;
|
|||
|
||||
#[test]
|
||||
fn test_lev_distance() {
|
||||
use std::char::{from_u32, MAX};
|
||||
// Test bytelength agnosticity
|
||||
for c in (0..MAX as u32).filter_map(from_u32).map(|i| i.to_string()) {
|
||||
for c in (0..char::MAX as u32).filter_map(char::from_u32).map(|i| i.to_string()) {
|
||||
assert_eq!(lev_distance(&c[..], &c[..], usize::MAX), Some(0));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue