We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cbe999d commit d17f366Copy full SHA for d17f366
bin/generator-utils/ngram
0 Bytes
util/ngram/src/main.rs
@@ -14,16 +14,12 @@ fn main() {
14
}
15
16
if let Some(top_result) = corpus.search(&slug, 0.25).first() {
17
- if top_result.similarity > 0.99 {
18
- println!("{}", top_result.text);
19
- } else {
20
- println!(
21
- "{} - There is an exercise with a similar name: '{}' [{:.0}% match]",
22
- slug,
23
- top_result.text,
24
- top_result.similarity * 100.0
25
- );
26
- }
+ println!(
+ "{} - There is an exercise with a similar name: '{}' [{:.0}% match]",
+ slug,
+ top_result.text,
+ top_result.similarity * 100.0
+ );
27
} else {
28
println!("Couldn't find any exercise similar to this: {}", slug);
29
0 commit comments