Partly implement differ struce, add Opcode struct

This commit is contained in:
Dima Kudosh
2016-02-17 21:03:12 +03:00
parent ca75fcc862
commit 38cc286ba2
3 changed files with 201 additions and 7 deletions
+10 -1
View File
@@ -17,4 +17,13 @@ pub fn calculate_ratio(matches: usize, length: usize) -> f32{
return 2.0 * matches as f32 / length as f32
}
return 1.0
}
}
pub fn str_with_similar_chars(c: char, length: usize) -> String {
let mut s = String::new();
for _ in 0..length{
s.push_str(&c.to_string());
}
s
}