Enable more lints
This commit is contained in:
parent
ede8621867
commit
611bf3a9f1
5 changed files with 26 additions and 37 deletions
42
Cargo.lock
generated
42
Cargo.lock
generated
|
|
@ -1,6 +1,6 @@
|
|||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 3
|
||||
version = 4
|
||||
|
||||
[[package]]
|
||||
name = "addr2line"
|
||||
|
|
@ -556,7 +556,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "c578f2b9abb4d5f3fbb12aba4008084d435dc6a8425c195cfe0b3594bfea0c25"
|
||||
dependencies = [
|
||||
"bitflags 2.5.0",
|
||||
"fontdb 0.16.2",
|
||||
"fontdb",
|
||||
"libm",
|
||||
"log",
|
||||
"rangemap",
|
||||
|
|
@ -565,7 +565,7 @@ dependencies = [
|
|||
"self_cell",
|
||||
"swash",
|
||||
"sys-locale",
|
||||
"ttf-parser 0.20.0",
|
||||
"ttf-parser",
|
||||
"unicode-bidi",
|
||||
"unicode-linebreak",
|
||||
"unicode-script",
|
||||
|
|
@ -862,21 +862,7 @@ dependencies = [
|
|||
"memmap2",
|
||||
"slotmap",
|
||||
"tinyvec",
|
||||
"ttf-parser 0.20.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fontdb"
|
||||
version = "0.17.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6d2894eb653f564384ae8da32b78d9c8db0394715525d917328e435b9babd902"
|
||||
dependencies = [
|
||||
"fontconfig-parser",
|
||||
"log",
|
||||
"memmap2",
|
||||
"slotmap",
|
||||
"tinyvec",
|
||||
"ttf-parser 0.21.1",
|
||||
"ttf-parser",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -1875,7 +1861,7 @@ version = "0.3.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e2e0f8ad4c197db38125b880c3c44544788665c7d5f4c42f5a35da44bca1a712"
|
||||
dependencies = [
|
||||
"ttf-parser 0.20.0",
|
||||
"ttf-parser",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -2265,7 +2251,7 @@ dependencies = [
|
|||
"bytemuck",
|
||||
"libm",
|
||||
"smallvec",
|
||||
"ttf-parser 0.20.0",
|
||||
"ttf-parser",
|
||||
"unicode-bidi-mirroring",
|
||||
"unicode-ccc",
|
||||
"unicode-properties",
|
||||
|
|
@ -2396,7 +2382,6 @@ dependencies = [
|
|||
"anyhow",
|
||||
"comemo",
|
||||
"cosmic-text",
|
||||
"fontdb 0.17.0",
|
||||
"image 0.25.1",
|
||||
"mark",
|
||||
"palette",
|
||||
|
|
@ -2415,7 +2400,6 @@ dependencies = [
|
|||
"anyhow",
|
||||
"axum",
|
||||
"clap",
|
||||
"cosmic-text",
|
||||
"escpos",
|
||||
"image 0.25.1",
|
||||
"mime_guess",
|
||||
|
|
@ -2915,12 +2899,6 @@ version = "0.20.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "17f77d76d837a7830fe1d4f12b7b4ba4192c1888001c7164257e4bc6d21d96b4"
|
||||
|
||||
[[package]]
|
||||
name = "ttf-parser"
|
||||
version = "0.21.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2c591d83f69777866b9126b24c6dd9a18351f177e49d625920d19f989fd31cf8"
|
||||
|
||||
[[package]]
|
||||
name = "two-face"
|
||||
version = "0.3.0"
|
||||
|
|
@ -2957,7 +2935,7 @@ dependencies = [
|
|||
"comemo",
|
||||
"csv",
|
||||
"ecow",
|
||||
"fontdb 0.16.2",
|
||||
"fontdb",
|
||||
"hayagriva",
|
||||
"hypher",
|
||||
"icu_properties",
|
||||
|
|
@ -2991,7 +2969,7 @@ dependencies = [
|
|||
"syntect",
|
||||
"time",
|
||||
"toml",
|
||||
"ttf-parser 0.20.0",
|
||||
"ttf-parser",
|
||||
"two-face",
|
||||
"typed-arena",
|
||||
"typst-assets",
|
||||
|
|
@ -3038,7 +3016,7 @@ dependencies = [
|
|||
"resvg",
|
||||
"roxmltree",
|
||||
"tiny-skia",
|
||||
"ttf-parser 0.20.0",
|
||||
"ttf-parser",
|
||||
"typst",
|
||||
"typst-macros",
|
||||
"typst-timing",
|
||||
|
|
@ -3234,7 +3212,7 @@ version = "0.38.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8c41888b9d5cf431fe852eaf9d047bbde83251b98f1749c2f08b1071e6db46e2"
|
||||
dependencies = [
|
||||
"fontdb 0.16.2",
|
||||
"fontdb",
|
||||
"kurbo",
|
||||
"log",
|
||||
"rustybuzz",
|
||||
|
|
|
|||
17
Cargo.toml
17
Cargo.toml
|
|
@ -20,14 +20,27 @@ default-features = false
|
|||
features = ["std", "taffy_tree", "flexbox", "grid", "block_layout"]
|
||||
|
||||
[workspace.lints]
|
||||
rust.unsafe_code = "forbid"
|
||||
rust.unsafe_code = { level = "forbid", priority = 1 }
|
||||
# Lint groups
|
||||
rust.deprecated_safe = "warn"
|
||||
rust.future_incompatible = "warn"
|
||||
rust.keyword_idents = "warn"
|
||||
rust.rust_2018_idioms = "warn"
|
||||
rust.unused = "warn"
|
||||
rust.noop_method_call = "warn"
|
||||
# Individual lints
|
||||
rust.non_local_definitions = "warn"
|
||||
rust.redundant_imports = "warn"
|
||||
rust.redundant_lifetimes = "warn"
|
||||
rust.single_use_lifetimes = "warn"
|
||||
rust.unit_bindings = "warn"
|
||||
rust.unused_crate_dependencies = "warn"
|
||||
rust.unused_import_braces = "warn"
|
||||
rust.unused_lifetimes = "warn"
|
||||
rust.unused_qualifications = "warn"
|
||||
# Clippy
|
||||
clippy.use_self = "warn"
|
||||
|
||||
|
||||
# Optimize dependencies in debug mode (mainly for faster image exports).
|
||||
# Does not apply to workspace members, only "real" dependencies.
|
||||
# https://doc.rust-lang.org/cargo/reference/profiles.html#overrides
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ edition.workspace = true
|
|||
anyhow.workspace = true
|
||||
comemo = "0.4.0"
|
||||
cosmic-text.workspace = true
|
||||
fontdb = "0.17.0"
|
||||
image.workspace = true
|
||||
mark.git = "https://github.com/Garmelon/mark.git"
|
||||
palette.workspace = true
|
||||
|
|
|
|||
|
|
@ -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