From 22b462e92aad3b88ff5e3e2c3787dc57979f8447 Mon Sep 17 00:00:00 2001 From: Andrew Cowie Date: Fri, 14 Mar 2025 23:32:22 +1100 Subject: [PATCH] Initial type aliases for locator types --- src/base62.rs | 2 ++ src/english16.rs | 2 ++ src/latin25.rs | 2 ++ 3 files changed, 6 insertions(+) diff --git a/src/base62.rs b/src/base62.rs index 821e3f4..01919d3 100644 --- a/src/base62.rs +++ b/src/base62.rs @@ -9,6 +9,8 @@ use base62; use sha2::Digest; +pub type Base62 = String; + /// Given a number, convert it to a string in the 62 symbol Base62 alphabet. pub fn to_base62(n: u64) -> String { // use the encoder from the base62 crate diff --git a/src/english16.rs b/src/english16.rs index dff4702..302a3df 100644 --- a/src/english16.rs +++ b/src/english16.rs @@ -41,6 +41,8 @@ use crate::greater_than; +pub type English16 = String; + /// Given a number, convert it to a string in the English16 base 16 symbol /// alphabet. /// diff --git a/src/latin25.rs b/src/latin25.rs index f31ca1b..7d72763 100644 --- a/src/latin25.rs +++ b/src/latin25.rs @@ -45,6 +45,8 @@ use crate::greater_than; use sha2::Digest; +pub type Latin25 = String; + /// Given a number, convert it to a string in the Latin25 base 25 symbol /// alphabet. ///