Partly implement differ struce, add Opcode struct
This commit is contained in:
+10
-1
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user