add parser for all formats #13

Merged
PlexSheep merged 11 commits from feat/parse-formats into devel 2024-05-13 15:54:23 +02:00
1 changed files with 1 additions and 12 deletions
Showing only changes of commit 7eb00e0f56 - Show all commits

View File

@ -306,18 +306,7 @@ where
None => s, None => s,
}; };
match fast32::base64::RFC4648.decode_str(s) { match fast32::base64::RFC4648.decode_str(s) {
Ok(r) => { Ok(r) => Ok(join::array_to_unsigned::<T>(&r)?),
if r.len() > 16 {
panic!("boom");
}
let mut ri: u128 = 0;
for (i, e) in r.iter().rev().enumerate() {
ri += (*e as u128) * 256.pow(i as u32) as u128;
}
dbg!(ri);
dbg!(format!("{ri:#x}"));
Ok(ri.to_string().parse().unwrap())
}
Err(e) => { Err(e) => {
PlexSheep marked this conversation as resolved
Review

use libpt here too!

use libpt here too!
let e = format!("{e}"); let e = format!("{e}");
Err(anyhow!(e)) Err(anyhow!(e))