rustup.
This commit is contained in:
parent
068707d312
commit
da775325ed
|
@ -843,8 +843,8 @@ pub fn encode_auto(data: &[u8], ec_level: EcLevel) -> QrResult<Bits> {
|
||||||
/// in the given error correction level.
|
/// in the given error correction level.
|
||||||
#[unstable]
|
#[unstable]
|
||||||
fn find_min_version(length: usize, ec_level: EcLevel) -> Version {
|
fn find_min_version(length: usize, ec_level: EcLevel) -> Version {
|
||||||
let mut min = 0us;
|
let mut min = 0;
|
||||||
let mut max = 39us;
|
let mut max = 39;
|
||||||
while min < max {
|
while min < max {
|
||||||
let half = (min + max) / 2;
|
let half = (min + max) / 2;
|
||||||
if DATA_LENGTHS[half][ec_level as usize] < length {
|
if DATA_LENGTHS[half][ec_level as usize] < length {
|
||||||
|
|
|
@ -1278,7 +1278,7 @@ impl Canvas {
|
||||||
for (i, b) in codewords.iter().enumerate() {
|
for (i, b) in codewords.iter().enumerate() {
|
||||||
let bits_end = if i == last_word { 4 } else { 0 };
|
let bits_end = if i == last_word { 4 } else { 0 };
|
||||||
'outside:
|
'outside:
|
||||||
for j in range_inclusive(bits_end, 7us).rev() {
|
for j in range_inclusive(bits_end, 7).rev() {
|
||||||
let color = if (*b & (1 << j)) != 0 {
|
let color = if (*b & (1 << j)) != 0 {
|
||||||
Module::DarkUnmasked
|
Module::DarkUnmasked
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue