From bf0e64c26a0712487ecb31e9ed70817a32173cf9 Mon Sep 17 00:00:00 2001 From: Erin Date: Sun, 13 Feb 2022 00:55:51 +0100 Subject: [PATCH] fixed base 55 --- ablescript/src/base_55.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ablescript/src/base_55.rs b/ablescript/src/base_55.rs index a822227..3cabcb1 100644 --- a/ablescript/src/base_55.rs +++ b/ablescript/src/base_55.rs @@ -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 = "AbleScript".chars().map(char2num).collect(); + let chrs: Vec = "AbleScript".chars().map(char2num).collect(); assert_eq!(chrs, &[-1, 2, 12, 5, -19, 3, 18, 9, 16, 20]); } }