# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
name = "fast-unescape"
version = "0.1.0"
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "'unescapes' a escaped string with escape sequences into literal one"
readme = "README.md"
keywords = ["unescape"]
categories = [
    "text-processing",
    "parsing",
    "no-std",
    "no-std::no-alloc",
]
license = "LGPL-3.0-or-later"
repository = "https://codeberg.org/DM-Earth/fast-unescape"

[badges.maintenance]
status = "actively-developed"

[features]
alloc = []
default = ["std"]
std = [
    "alloc",
    "memchr/std",
]

[lib]
name = "fast_unescape"
path = "src/lib.rs"

[[bench]]
name = "en_literature"
path = "benches/en_literature.rs"
harness = false

[[bench]]
name = "simple_unescape"
path = "benches/simple_unescape.rs"
harness = false

[[bench]]
name = "zh_literature"
path = "benches/zh_literature.rs"
harness = false

[dependencies.memchr]
version = "2.8"
default-features = false

[dev-dependencies.criterion]
version = "0.8"
features = ["html_reports"]

[dev-dependencies.unescaper]
version = "0.1"

[lints.clippy]
cloned-instead-of-copied = "warn"
coerce-container-to-any = "warn"
decimal-literal-representation = "warn"
elidable-lifetime-names = "warn"
exhaustive-enums = "warn"
future-not-send = "warn"
if-not-else = "warn"
if-then-some-else-none = "warn"
impl-trait-in-params = "warn"
inline-always = "warn"
ip-constant = "warn"
iter-without-into-iter = "warn"
macro-use-imports = "deny"
manual-is-power-of-two = "warn"
manual-midpoint = "warn"
map-with-unused-argument-over-ranges = "warn"
missing-errors-doc = "warn"
missing-panics-doc = "warn"
multiple-crate-versions = "warn"
redundant-clone = "warn"
redundant-test-prefix = "warn"
ref-as-ptr = "warn"
ref-option = "warn"
str-to-string = "warn"
suboptimal-flops = "warn"
todo = "warn"
too-long-first-doc-paragraph = "warn"
unnecessary-debug-formatting = "warn"
unnecessary-semicolon = "warn"
unused-trait-names = "warn"
use-self = "warn"
useless-let-if-seq = "warn"

[lints.rust]
dyn-drop = "forbid"
elided-lifetimes-in-paths = "deny"
ellipsis-inclusive-range-patterns = "forbid"
exported-private-dependencies = "forbid"
let-underscore-drop = "warn"
missing-debug-implementations = "warn"
missing-docs = "warn"
single-use-lifetimes = "warn"
trivial-numeric-casts = "warn"
uncommon-codepoints = "deny"
unused-lifetimes = "forbid"
unused-macro-rules = "warn"
unused-qualifications = "warn"
variant-size-differences = "warn"

[lints.rust.unexpected_cfgs]
level = "warn"
priority = 0
check-cfg = []
