mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-26 20:32:34 +00:00
clippy fix
This commit is contained in:
@@ -9,84 +9,84 @@ use crate::{common::BitMatrix, qrcode::cpp_port::data_mask::GetMaskedBit};
|
||||
#[test]
|
||||
fn Mask0() {
|
||||
TestMaskAcrossDimensions(0, |i, j| {
|
||||
return (i + j) % 2 == 0;
|
||||
(i + j) % 2 == 0
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn Mask1() {
|
||||
TestMaskAcrossDimensions(1, |i, _| {
|
||||
return i % 2 == 0;
|
||||
i % 2 == 0
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn Mask2() {
|
||||
TestMaskAcrossDimensions(2, |_, j| {
|
||||
return j % 3 == 0;
|
||||
j % 3 == 0
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn Mask3() {
|
||||
TestMaskAcrossDimensions(3, |i, j| {
|
||||
return (i + j) % 3 == 0;
|
||||
(i + j) % 3 == 0
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn Mask4() {
|
||||
TestMaskAcrossDimensions(4, |i, j| {
|
||||
return (i / 2 + j / 3) % 2 == 0;
|
||||
(i / 2 + j / 3) % 2 == 0
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn Mask5() {
|
||||
TestMaskAcrossDimensions(5, |i, j| {
|
||||
return (i * j) % 2 + (i * j) % 3 == 0;
|
||||
(i * j) % 2 + (i * j) % 3 == 0
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn Mask6() {
|
||||
TestMaskAcrossDimensions(6, |i, j| {
|
||||
return ((i * j) % 2 + (i * j) % 3) % 2 == 0;
|
||||
((i * j) % 2 + (i * j) % 3) % 2 == 0
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn Mask7() {
|
||||
TestMaskAcrossDimensions(7, |i, j| {
|
||||
return ((i + j) % 2 + (i * j) % 3) % 2 == 0;
|
||||
((i + j) % 2 + (i * j) % 3) % 2 == 0
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn MicroMask0() {
|
||||
TestMicroMaskAcrossDimensions(0, |i, _| {
|
||||
return i % 2 == 0;
|
||||
i % 2 == 0
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn MicroMask1() {
|
||||
TestMicroMaskAcrossDimensions(1, |i, j| {
|
||||
return (i / 2 + j / 3) % 2 == 0;
|
||||
(i / 2 + j / 3) % 2 == 0
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn MicroMask2() {
|
||||
TestMicroMaskAcrossDimensions(2, |i, j| {
|
||||
return ((i * j) % 2 + (i * j) % 3) % 2 == 0;
|
||||
((i * j) % 2 + (i * j) % 3) % 2 == 0
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn MicroMask3() {
|
||||
TestMicroMaskAcrossDimensions(3, |i, j| {
|
||||
return ((i + j) % 2 + (i * j) % 3) % 2 == 0;
|
||||
((i + j) % 2 + (i * j) % 3) % 2 == 0
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user