fixed base 55

pull/4/head
ondra05 2022-02-13 00:55:51 +01:00
parent 3dd91b0c97
commit 9e8456195c
1 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
pub fn char2num(character: char) -> i32 {
pub fn char2num(character: char) -> isize {
match character {
'Z' => -26,
'Y' => -25,
@ -66,7 +66,7 @@ mod tests {
use super::*;
#[test]
fn str_to_base55() {
let chrs: Vec<i32> = "AbleScript".chars().map(char2num).collect();
let chrs: Vec<isize> = "AbleScript".chars().map(char2num).collect();
assert_eq!(chrs, &[-1, 2, 12, 5, -19, 3, 18, 9, 16, 20]);
}
}