diff --git a/src/lib.rs b/src/lib.rs index f2306352..b12fc764 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -51,8 +51,8 @@ #![deny(unused_mut)] #![cfg_attr(feature = "strict", deny(warnings))] -use std::{error, fmt}; use std::borrow::Cow; +use std::{error, fmt}; // AsciiExt is needed for Rust 1.14 but not for newer versions #[allow(unused_imports, deprecated)] @@ -526,25 +526,21 @@ fn polymod(values: &[u5]) -> u32 { const SEP: char = '1'; /// Encoding character set. Maps data value -> char -#[rustfmt::skip] const CHARSET: [char; 32] = [ - 'q','p','z','r','y','9','x','8', - 'g','f','2','t','v','d','w','0', - 's','3','j','n','5','4','k','h', - 'c','e','6','m','u','a','7','l' + 'q', 'p', 'z', 'r', 'y', '9', 'x', '8', // +0 + 'g', 'f', '2', 't', 'v', 'd', 'w', '0', // +8 + 's', '3', 'j', 'n', '5', '4', 'k', 'h', // +16 + 'c', 'e', '6', 'm', 'u', 'a', '7', 'l', // +24 ]; /// Reverse character set. Maps ASCII byte -> CHARSET index on [0,31] -#[rustfmt::skip] const CHARSET_REV: [i8; 128] = [ - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 15, -1, 10, 17, 21, 20, 26, 30, 7, 5, -1, -1, -1, -1, -1, -1, - -1, 29, -1, 24, 13, 25, 9, 8, 23, -1, 18, 22, 31, 27, 19, -1, - 1, 0, 3, 16, 11, 28, 12, 14, 6, 4, 2, -1, -1, -1, -1, -1, - -1, 29, -1, 24, 13, 25, 9, 8, 23, -1, 18, 22, 31, 27, 19, -1, - 1, 0, 3, 16, 11, 28, 12, 14, 6, 4, 2, -1, -1, -1, -1, -1 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 15, -1, 10, 17, 21, 20, 26, 30, 7, 5, -1, -1, -1, -1, -1, -1, -1, 29, -1, 24, 13, 25, 9, 8, 23, + -1, 18, 22, 31, 27, 19, -1, 1, 0, 3, 16, 11, 28, 12, 14, 6, 4, 2, -1, -1, -1, -1, -1, -1, 29, + -1, 24, 13, 25, 9, 8, 23, -1, 18, 22, 31, 27, 19, -1, 1, 0, 3, 16, 11, 28, 12, 14, 6, 4, 2, -1, + -1, -1, -1, -1, ]; /// Generator coefficients