| 1 | //! Struct containing an u8-array of C size to store bitwise boolean values |
| 2 | |
| 3 | #![deny(unsafe_code)] |
| 4 | #![warn(missing_docs)] |
| 5 | |
| 6 | use corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::{Displayrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Display#, Formatterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Formatter#}; |
| 7 | |
| 8 | use craterust-analyzer cargo fast_qr 0.13.1 crate/::Versionrust-analyzer cargo fast_qr 0.13.1 version/Version#; |
| 9 | |
| 10 | /// Values to keep last X bits of a u8 |
| 11 | /// `KEEP_LAST[i]` equates `(1 << i) - 1` |
| 12 | /// |
| 13 | /// # Example |
| 14 | /// ```rust |
| 15 | /// # pub const KEEP_LAST: [usize; 65] = [ |
| 16 | /// # 0, 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191, 16383, |
| 17 | /// # 32767, 65535, 131071, 262143, 524287, 1048575, 2097151, 4194303, 8388607, |
| 18 | /// # 16777215, 33554431, 67108863, 134217727, 268435455, 536870911, 1073741823, |
| 19 | /// # 2147483647, 4294967295, 8589934591, 17179869183, 34359738367, 68719476735, |
| 20 | /// # 137438953471, 274877906943, 549755813887, 1099511627775, 2199023255551, |
| 21 | /// # 4398046511103, 8796093022207, 17592186044415, 35184372088831, |
| 22 | /// # 70368744177663, 140737488355327, 281474976710655, 562949953421311, |
| 23 | /// # 1125899906842623, 2251799813685247, 4503599627370495, 9007199254740991, |
| 24 | /// # 18014398509481983, 36028797018963967, 72057594037927935, |
| 25 | /// # 144115188075855871, 288230376151711743, 576460752303423487, |
| 26 | /// # 1152921504606846975, 2305843009213693951, 4611686018427387903, |
| 27 | /// # 9223372036854775807, 18446744073709551615, |
| 28 | /// # ]; |
| 29 | /// let mut b = 0b1010_1010; |
| 30 | /// assert_eq!(b & KEEP_LAST[3], 0b010) |
| 31 | /// ``` |
| 32 | #[rustfmt::skip] |
| 33 | #[cfg(not(target_arch = "wasm32"))] |
| 34 | pub const KEEP_LASTrust-analyzer cargo fast_qr 0.13.1 compact/KEEP_LAST.: [usize; 65] = [ |
| 35 | 0, 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191, 16383, |
| 36 | 32767, 65535, 131_071, 262_143, 524_287, 1_048_575, 2_097_151, 4_194_303, 8_388_607, |
| 37 | 16_777_215, 33_554_431, 67_108_863, 134_217_727, 268_435_455, 536_870_911, 1_073_741_823, |
| 38 | 2_147_483_647, 4_294_967_295, 8_589_934_591, 17_179_869_183, 34_359_738_367, 68_719_476_735, |
| 39 | 137_438_953_471, 274_877_906_943, 549_755_813_887, 1_099_511_627_775, 2_199_023_255_551, |
| 40 | 4_398_046_511_103, 8_796_093_022_207, 17_592_186_044_415, 35_184_372_088_831, |
| 41 | 70_368_744_177_663, 140_737_488_355_327, 281_474_976_710_655, 562_949_953_421_311, |
| 42 | 1_125_899_906_842_623, 2_251_799_813_685_247, 4_503_599_627_370_495, 9_007_199_254_740_991, |
| 43 | 18_014_398_509_481_983, 36_028_797_018_963_967, 72_057_594_037_927_935, |
| 44 | 144_115_188_075_855_871, 288_230_376_151_711_743, 576_460_752_303_423_487, |
| 45 | 1_152_921_504_606_846_975, 2_305_843_009_213_693_951, 4_611_686_018_427_387_903, |
| 46 | 9_223_372_036_854_775_807, 18_446_744_073_709_551_615, |
| 47 | ]; |
| 48 | |
| 49 | /// Values to keep last X bits of a u8 |
| 50 | /// `KEEP_LAST[i]` equates `(1 << i) - 1` |
| 51 | #[rustfmt::skip] |
| 52 | #[cfg(target_arch = "wasm32")] |
| 53 | pub const KEEP_LAST: [usize; 33] = [ |
| 54 | 0, 1, 3, 7, 15, 31, 63, 127, 255, 511, 1_023, 2_047, 4_095, 8_191, 16_383, |
| 55 | 32_767, 65_535, 131_071, 262_143, 524_287, 1_048_575, 2_097_151, 4_194_303, 8_388_607, |
| 56 | 16_777_215, 33_554_431, 67_108_863, 134_217_727, 268_435_455, 536_870_911, 1_073_741_823, |
| 57 | 2_147_483_647, 4_294_967_295, |
| 58 | ]; |
| 59 | |
| 60 | /// `CompactQR` is a struct that contains a `Vec<u8>` to store boolean values as bits. |
| 61 | pub struct CompactQRrust-analyzer cargo fast_qr 0.13.1 compact/CompactQR# { |
| 62 | pub lenrust-analyzer cargo fast_qr 0.13.1 compact/CompactQR#len.: usize, |
| 63 | pub datarust-analyzer cargo fast_qr 0.13.1 compact/CompactQR#data.: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<u8>, |
| 64 | } |
| 65 | |
| 66 | /// Returns a string visualization of the `CompactQR`. \ |
| 67 | /// `CompactQR { len: 4, data: [0b1111_1010] }.to_string()` => `"1010"` |
| 68 | impl Displayrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Display# for CompactQRrust-analyzer cargo fast_qr 0.13.1 compact/CompactQR# { |
| 69 | fn fmtrust-analyzer cargo fast_qr 0.13.1 compact/impl#[CompactQR][Display]fmt().(&self, f: &mut Formatterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Formatter#<'_>) -> corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Result# { |
| 70 | let mut res = Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#::with_capacityrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]with_capacity().(self.lenrust-analyzer cargo fast_qr 0.13.1 compact/CompactQR#len.); |
| 71 | |
| 72 | for i in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#(self.datarust-analyzer cargo fast_qr 0.13.1 compact/CompactQR#data..capacityrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]capacity().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Div<Self>`]div().8) { |
| 73 | let nb = self.datarust-analyzer cargo fast_qr 0.13.1 compact/CompactQR#data.[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index().i]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index().; |
| 74 | for j in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#8 { |
| 75 | if i rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul().8 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().j rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]ge().self.lenrust-analyzer cargo fast_qr 0.13.1 compact/CompactQR#len. { |
| 76 | return f.write_strrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'a>`]write_str().(&res); |
| 77 | } |
| 78 | |
| 79 | let j = 7 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().j; |
| 80 | let c = if nb rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().(1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<usize>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<usize>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<usize>`]shl().j) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().0 { '0' } else { '1' }; |
| 81 | res.pushrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]push().(c); |
| 82 | } |
| 83 | } |
| 84 | |
| 85 | f.write_strrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'a>`]write_str().(&res) |
| 86 | } |
| 87 | } |
| 88 | |
| 89 | #[allow(clippy::cast_possible_truncation)] |
| 90 | impl CompactQRrust-analyzer cargo fast_qr 0.13.1 compact/CompactQR# { |
| 91 | /// Instantiates a new `CompactQR`, should not be used, reduces performance. |
| 92 | #[allow(dead_code)] |
| 93 | pub const fn newrust-analyzer cargo fast_qr 0.13.1 compact/impl#[CompactQR]new().() -> Selfrust-analyzer cargo fast_qr 0.13.1 compact/impl#[CompactQR] { |
| 94 | CompactQRrust-analyzer cargo fast_qr 0.13.1 compact/CompactQR# { |
| 95 | lenrust-analyzer cargo fast_qr 0.13.1 compact/CompactQR#len.: 0, |
| 96 | datarust-analyzer cargo fast_qr 0.13.1 compact/CompactQR#data.: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T>`]new().(), |
| 97 | } |
| 98 | } |
| 99 | |
| 100 | pub fn from_versionrust-analyzer cargo fast_qr 0.13.1 compact/impl#[CompactQR]from_version().(version: Versionrust-analyzer cargo fast_qr 0.13.1 version/Version#) -> Selfrust-analyzer cargo fast_qr 0.13.1 compact/impl#[CompactQR] { |
| 101 | let len = version.max_bytesrust-analyzer cargo fast_qr 0.13.1 version/impl#[Version]max_bytes().(); |
| 102 | let data = vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0; len *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul(). 8]; |
| 103 | |
| 104 | CompactQRrust-analyzer cargo fast_qr 0.13.1 compact/CompactQR# { lenrust-analyzer cargo fast_qr 0.13.1 compact/CompactQR#len.: 0, datarust-analyzer cargo fast_qr 0.13.1 compact/CompactQR#data. } |
| 105 | } |
| 106 | |
| 107 | /// Instantiates a new `CompactQR`, with a given length, expects the length to be a multiple of 8. |
| 108 | #[allow(dead_code)] |
| 109 | #[cfg(test)] |
| 110 | pub fn with_lenrust-analyzer cargo fast_qr 0.13.1 compact/impl#[CompactQR]with_len().(data_length: usize) -> Selfrust-analyzer cargo fast_qr 0.13.1 compact/impl#[CompactQR] { |
| 111 | let length = data_length rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Div<Self>`]div().8 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().usize::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[usize][`From<bool>`]from().(data_length rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Rem<Self>`]rem().%rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Rem<Self>`]rem(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Rem<Self>`]rem().8 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]ne().0); |
| 112 | CompactQRrust-analyzer cargo fast_qr 0.13.1 compact/CompactQR# { |
| 113 | lenrust-analyzer cargo fast_qr 0.13.1 compact/CompactQR#len.: 0, |
| 114 | datarust-analyzer cargo fast_qr 0.13.1 compact/CompactQR#data.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0; length], |
| 115 | } |
| 116 | } |
| 117 | |
| 118 | /// Increase the length of data to specified length. |
| 119 | pub fn increase_lenrust-analyzer cargo fast_qr 0.13.1 compact/impl#[CompactQR]increase_len().(&mut self, data_length: usize) { |
| 120 | if data_length rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Div<Self>`]div().8 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]ge().self.datarust-analyzer cargo fast_qr 0.13.1 compact/CompactQR#data..lenrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]len().() { |
| 121 | self.datarust-analyzer cargo fast_qr 0.13.1 compact/CompactQR#data..resizerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]resize().(data_length rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Div<Self>`]div().8 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().1, 0); |
| 122 | } |
| 123 | } |
| 124 | |
| 125 | /// Instantiates a new `CompactQR` from an already created array |
| 126 | pub fn from_arrayrust-analyzer cargo fast_qr 0.13.1 compact/impl#[CompactQR]from_array().(data: &[u8], len: usize) -> Selfrust-analyzer cargo fast_qr 0.13.1 compact/impl#[CompactQR] { |
| 127 | CompactQRrust-analyzer cargo fast_qr 0.13.1 compact/CompactQR# { |
| 128 | lenrust-analyzer cargo fast_qr 0.13.1 compact/CompactQR#len., |
| 129 | datarust-analyzer cargo fast_qr 0.13.1 compact/CompactQR#data.: data.to_vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc slice/impl#[`[T]`]to_vec().(), |
| 130 | } |
| 131 | } |
| 132 | |
| 133 | /// Returns `len`, length is the current number of bits / boolean values stored in the array. |
| 134 | pub const fn lenrust-analyzer cargo fast_qr 0.13.1 compact/impl#[CompactQR]len().(&self) -> usize { |
| 135 | self.lenrust-analyzer cargo fast_qr 0.13.1 compact/CompactQR#len. |
| 136 | } |
| 137 | |
| 138 | /// Returns `data`, the array of bits. |
| 139 | pub const fn get_datarust-analyzer cargo fast_qr 0.13.1 compact/impl#[CompactQR]get_data().(&self) -> &Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<u8> { |
| 140 | &self.datarust-analyzer cargo fast_qr 0.13.1 compact/CompactQR#data. |
| 141 | } |
| 142 | |
| 143 | /// Pushes eight values in the `CompactQR`, if the array is not big enough, it will be resized. |
| 144 | #[inline(always)] |
| 145 | #[allow(dead_code)] |
| 146 | pub fn push_u8rust-analyzer cargo fast_qr 0.13.1 compact/impl#[CompactQR]push_u8().(&mut self, bits: u8) { |
| 147 | self.increase_lenrust-analyzer cargo fast_qr 0.13.1 compact/impl#[CompactQR]increase_len().(self.lenrust-analyzer cargo fast_qr 0.13.1 compact/CompactQR#len. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().8); |
| 148 | |
| 149 | let right = self.lenrust-analyzer cargo fast_qr 0.13.1 compact/CompactQR#len. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Rem<Self>`]rem().%rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Rem<Self>`]rem(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Rem<Self>`]rem().8; |
| 150 | let first_idx = self.lenrust-analyzer cargo fast_qr 0.13.1 compact/CompactQR#len. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Div<Self>`]div().8; |
| 151 | |
| 152 | if right rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().0 { |
| 153 | self.datarust-analyzer cargo fast_qr 0.13.1 compact/CompactQR#data.[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().first_idx]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut(). = bits; |
| 154 | } else { |
| 155 | let left = 8 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().right; |
| 156 | self.datarust-analyzer cargo fast_qr 0.13.1 compact/CompactQR#data.[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().first_idx]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitOrAssign<Self>`]bitor_assign().|=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitOrAssign<Self>`]bitor_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitOrAssign<Self>`]bitor_assign().(bits rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shr<usize>`]shr().>>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shr<usize>`]shr(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shr<usize>`]shr().right) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().(KEEP_LASTrust-analyzer cargo fast_qr 0.13.1 compact/KEEP_LAST.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().left]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as u8); |
| 157 | self.datarust-analyzer cargo fast_qr 0.13.1 compact/CompactQR#data.[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().first_idx rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().1]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitOrAssign<Self>`]bitor_assign().|=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitOrAssign<Self>`]bitor_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitOrAssign<Self>`]bitor_assign().(bits rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().KEEP_LASTrust-analyzer cargo fast_qr 0.13.1 compact/KEEP_LAST.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().right]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as u8) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<usize>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<usize>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<usize>`]shl().left; |
| 158 | } |
| 159 | |
| 160 | self.lenrust-analyzer cargo fast_qr 0.13.1 compact/CompactQR#len. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().8; |
| 161 | } |
| 162 | |
| 163 | /// Pushes the u8 array in the `CompactQR`, using the `push_u8` function. \ |
| 164 | /// If the array is not big enough, it will be resized. |
| 165 | #[inline(always)] |
| 166 | pub fn push_u8_slicerust-analyzer cargo fast_qr 0.13.1 compact/impl#[CompactQR]push_u8_slice().(&mut self, slice: &[u8]) { |
| 167 | self.increase_lenrust-analyzer cargo fast_qr 0.13.1 compact/impl#[CompactQR]increase_len().(self.lenrust-analyzer cargo fast_qr 0.13.1 compact/CompactQR#len. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().8 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul().slice.lenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]len().()); |
| 168 | |
| 169 | for &u in slice { |
| 170 | self.push_u8rust-analyzer cargo fast_qr 0.13.1 compact/impl#[CompactQR]push_u8().(u); |
| 171 | } |
| 172 | } |
| 173 | |
| 174 | /// Pushes `len` values to the `CompactQR`. \ |
| 175 | /// If the array is not big enough, it will be resized. |
| 176 | #[inline(always)] |
| 177 | pub fn push_bitsrust-analyzer cargo fast_qr 0.13.1 compact/impl#[CompactQR]push_bits().(&mut self, bits: usize, len: usize) { |
| 178 | self.increase_lenrust-analyzer cargo fast_qr 0.13.1 compact/impl#[CompactQR]increase_len().(self.lenrust-analyzer cargo fast_qr 0.13.1 compact/CompactQR#len. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().len); |
| 179 | |
| 180 | // Caps to max usize bits |
| 181 | let bits = bits rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[usize][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[usize][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[usize][`BitAnd<Self>`]bitand().KEEP_LASTrust-analyzer cargo fast_qr 0.13.1 compact/KEEP_LAST.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().len]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().; |
| 182 | |
| 183 | let rem_space = (8 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().self.lenrust-analyzer cargo fast_qr 0.13.1 compact/CompactQR#len. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Rem<Self>`]rem().%rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Rem<Self>`]rem(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Rem<Self>`]rem().8) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Rem<Self>`]rem().%rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Rem<Self>`]rem(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Rem<Self>`]rem().8; |
| 184 | let first = self.lenrust-analyzer cargo fast_qr 0.13.1 compact/CompactQR#len. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Div<Self>`]div().8; |
| 185 | |
| 186 | if rem_space rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]gt().len { |
| 187 | self.datarust-analyzer cargo fast_qr 0.13.1 compact/CompactQR#data.[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().first]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitOrAssign<Self>`]bitor_assign().|=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitOrAssign<Self>`]bitor_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitOrAssign<Self>`]bitor_assign().(bits rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[usize][`Shl<Self>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[usize][`Shl<Self>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[usize][`Shl<Self>`]shl().(rem_space rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().len)) as u8; |
| 188 | self.lenrust-analyzer cargo fast_qr 0.13.1 compact/CompactQR#len. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().len; |
| 189 | return; |
| 190 | } |
| 191 | |
| 192 | if rem_space rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]ne().0 { |
| 193 | self.datarust-analyzer cargo fast_qr 0.13.1 compact/CompactQR#data.[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().first]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitOrAssign<Self>`]bitor_assign().|=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitOrAssign<Self>`]bitor_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitOrAssign<Self>`]bitor_assign().((bits rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[usize][`Shr<Self>`]shr().>>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[usize][`Shr<Self>`]shr(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[usize][`Shr<Self>`]shr().(len rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().rem_space)) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[usize][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[usize][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[usize][`BitAnd<Self>`]bitand().KEEP_LASTrust-analyzer cargo fast_qr 0.13.1 compact/KEEP_LAST.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().rem_space]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().) as u8; |
| 194 | self.lenrust-analyzer cargo fast_qr 0.13.1 compact/CompactQR#len. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().rem_space; |
| 195 | } |
| 196 | |
| 197 | for i in (8..=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeInclusive#len rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().rem_space).revrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#rev().().step_byrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#step_by().(8) { |
| 198 | self.push_u8rust-analyzer cargo fast_qr 0.13.1 compact/impl#[CompactQR]push_u8().((bits rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[usize][`Shr<Self>`]shr().>>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[usize][`Shr<Self>`]shr(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[usize][`Shr<Self>`]shr().(i rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().8)) as u8); |
| 199 | } |
| 200 | |
| 201 | let remaining = (len rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().rem_space) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Rem<Self>`]rem().%rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Rem<Self>`]rem(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Rem<Self>`]rem().8; |
| 202 | if remaining rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().0 { |
| 203 | return; |
| 204 | } |
| 205 | |
| 206 | self.datarust-analyzer cargo fast_qr 0.13.1 compact/CompactQR#data.[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().self.lenrust-analyzer cargo fast_qr 0.13.1 compact/CompactQR#len. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Div<Self>`]div().8]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u8][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u8][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u8][`AddAssign<Self>`]add_assign().((bits rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[usize][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[usize][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[usize][`BitAnd<Self>`]bitand().KEEP_LASTrust-analyzer cargo fast_qr 0.13.1 compact/KEEP_LAST.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().remaining]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().) as u8) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<usize>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<usize>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<usize>`]shl().(8 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().remaining); |
| 207 | self.lenrust-analyzer cargo fast_qr 0.13.1 compact/CompactQR#len. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().remaining; |
| 208 | } |
| 209 | |
| 210 | /// Fills the `CompactQR`'s remaining space with `[236, 17]`. |
| 211 | /// Expects the `CompactQR` `len` to be a multiple of 8. |
| 212 | #[inline(always)] |
| 213 | pub fn fillrust-analyzer cargo fast_qr 0.13.1 compact/impl#[CompactQR]fill().(&mut self) { |
| 214 | const PAD_BYTESrust-analyzer cargo fast_qr 0.13.1 compact/PAD_BYTES.: [u8; 2] = [0b1110_1100, 0b0001_0001]; //[236, 17] |
| 215 | |
| 216 | #[cfg(debug_assertions)] |
| 217 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(self.lenrust-analyzer cargo fast_qr 0.13.1 compact/CompactQR#len. %rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Rem<Self>`]rem(). 8, 0); |
| 218 | |
| 219 | for (i, _) in (self.lenrust-analyzer cargo fast_qr 0.13.1 compact/CompactQR#len...rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#self.datarust-analyzer cargo fast_qr 0.13.1 compact/CompactQR#data..lenrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]len().()).step_byrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#step_by().(8).enumeraterust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#enumerate().() { |
| 220 | let bits = PAD_BYTESrust-analyzer cargo fast_qr 0.13.1 compact/PAD_BYTES.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().i rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Rem<Self>`]rem().%rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Rem<Self>`]rem(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Rem<Self>`]rem().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().; |
| 221 | self.push_u8rust-analyzer cargo fast_qr 0.13.1 compact/impl#[CompactQR]push_u8().(bits); |
| 222 | } |
| 223 | } |
| 224 | } |