Enable more lints
This commit is contained in:
parent
ede8621867
commit
611bf3a9f1
5 changed files with 26 additions and 37 deletions
|
|
@ -7,7 +7,6 @@ edition.workspace = true
|
|||
anyhow.workspace = true
|
||||
axum = { version = "0.7.5", features = ["multipart"] }
|
||||
clap = { version = "4.5.4", features = ["derive", "deprecated"] }
|
||||
cosmic-text.workspace = true
|
||||
escpos = { version = "0.12.2" }
|
||||
image.workspace = true
|
||||
mime_guess = "2.0.4"
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ fn neighbors_at(image: &RgbaImage, x: u32, y: u32) -> [bool; 3] {
|
|||
|
||||
fn apply_rule(rule: u8, neighbors: [bool; 3]) -> bool {
|
||||
let [left, mid, right] = neighbors.map(|n| n as u8);
|
||||
let index = left << 2 | mid << 1 | right;
|
||||
let index = (left << 2) | (mid << 1) | right;
|
||||
rule & (1 << index) != 0
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue