1
Fork 0

Use associated items of char instead of freestanding items in core::char

This commit is contained in:
Lukas Markeffsky 2023-01-14 11:48:43 +01:00
parent c0b8735959
commit 76e216f29b
12 changed files with 21 additions and 45 deletions

View file

@ -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));
}