1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
use similar::get_close_matches; fn main() { let words = vec![ "apple", "appu", "appal", "apparitor", "beer", "beeb", "beeline", ]; println!("{:?}", get_close_matches("app", &words, 3, 0.7)); println!("{:?}", get_close_matches("bee", &words, 3, 0.7)); }