|
|
@ -17,6 +17,23 @@ impl Digest {
|
|
|
|
{
|
|
|
|
{
|
|
|
|
let mut d = Self::default();
|
|
|
|
let mut d = Self::default();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let oneesan = usize::from(from[0]) % map::KANA.len();
|
|
|
|
|
|
|
|
d.0 = Some(map::KANA[oneesan]);
|
|
|
|
|
|
|
|
if from[1] > 0 {
|
|
|
|
|
|
|
|
if let Some(imoutos) = map::sub(oneesan) {
|
|
|
|
|
|
|
|
if let Some(imouto) = imoutos[usize::from(from[1]) % map::KANA_SUB.len()]
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
d.1 = Some(imouto);
|
|
|
|
|
|
|
|
return d;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
let from = [from[1], 0];
|
|
|
|
|
|
|
|
d.1 = Self::new(&from[..]).0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
d
|
|
|
|
|
|
|
|
// Old
|
|
|
|
|
|
|
|
/*let mut d = Self::default();
|
|
|
|
|
|
|
|
|
|
|
|
let oneesan = usize::from(from[0]) % map::KANA.len();
|
|
|
|
let oneesan = usize::from(from[0]) % map::KANA.len();
|
|
|
|
d.0 = Some(map::KANA[oneesan]);
|
|
|
|
d.0 = Some(map::KANA[oneesan]);
|
|
|
|
if from[1] > 0 {
|
|
|
|
if from[1] > 0 {
|
|
|
@ -30,7 +47,7 @@ impl Digest {
|
|
|
|
let from = [from[1], 0];
|
|
|
|
let from = [from[1], 0];
|
|
|
|
d.1 = Self::new(&from[..]).0;
|
|
|
|
d.1 = Self::new(&from[..]).0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
d
|
|
|
|
d*/
|
|
|
|
/*let oneesan = usize::from(from) % map::KANA.len();
|
|
|
|
/*let oneesan = usize::from(from) % map::KANA.len();
|
|
|
|
d.0 = Some(map::KANA[oneesan]);
|
|
|
|
d.0 = Some(map::KANA[oneesan]);
|
|
|
|
if let Some(imoutos) = map::sub(oneesan) {
|
|
|
|
if let Some(imoutos) = map::sub(oneesan) {
|
|
|
|