-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCargo.toml
118 lines (108 loc) · 4.92 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
[package]
name = "miku-server-timing"
version = "0.2.0"
edition = "2021"
rust-version = "1.75"
# === Publication info ===
authors = ["Hantong Chen <[email protected]>", "Jens Walter <[email protected]>"]
categories = ["asynchronous", "network-programming", "web-programming::http-server"]
description = "An axum layer to inject the Server-Timing HTTP header into the response."
keywords = ["axum-server", "http-header", "web-server"]
license = "MIT OR Apache-2.0"
readme = "README.md"
repository = "https://github.com/cxw620/miku-server-timing"
[dependencies]
http = "1.0.0"
macro-toolset = { version = "0.8.0", default-features = false, features = [
"feat-string",
"feat-string-ext-http",
"feat-string-ext-ryu",
] }
pin-project-lite = "0.2.16"
tower-layer = "0.3"
tower-service = "0.3"
tracing = { version = "0.1", optional = true }
[dev-dependencies]
axum = "0.8"
minreq = "2.13"
tokio = "1.43"
[features]
default = ["feat-tracing"]
# Enable tracing
feat-tracing = ["dep:tracing"]
# === Lints config ===
[lints.rust]
unsafe_code = "warn"
missing_docs = "warn"
missing_debug_implementations = "warn"
unreachable_pub = "warn"
# Only works in nightly channel, use `cargo +nightly clippy --fix --allow-dirty --allow-staged`
[lints.clippy]
# See: https://rust-lang.github.io/rust-clippy/master/index.html for more details.
# Checks for attributes that allow lints without a reason.
allow_attributes_without_reason = "warn"
# Checks for `assert!(r.is_ok())` or `assert!(r.is_err())` calls, just `unwrap()` instead.
assertions_on_result_states = "warn"
# Checks for code like `foo = bar.clone()`; use `Clone::clone_from()` instead.
assigning_clones = "warn"
# Instead of using an if statement to convert a bool to an int, this lint suggests using a from() function or an as coercion.
bool_to_int_with_if = "warn"
# Checks for methods with high cognitive complexity.
cognitive_complexity = "warn"
# Checks usage of std::fs::create_dir and suggest using std::fs::create_dir_all instead.
create_dir = "warn"
# Checks for usage of the dbg! macro.
dbg_macro = "warn"
# Checks for function/method calls with a mutable parameter in debug_assert!, debug_assert_eq! and debug_assert_ne! macros.
# Mutating something in a debug_assert! macro results in different behavior between a release and debug build.
debug_assert_with_mut_call = "warn"
# Checks for literal calls to `Default::default()`. Use `$type::default()` instead.
default_trait_access = "warn"
# Checks for types that derive PartialEq and could implement Eq.
# derive_partial_eq_without_eq = "warn"
# Checks for usage of unicode scripts other than those explicitly allowed by the lint config.
disallowed_script_idents = "deny"
# Detects the syntax ['foo'] in documentation comments (notice quotes instead of backticks) outside of code blocks
doc_link_with_quotes = "warn"
# Checks for the presence of _, :: or camel-case words outside ticks in documentation.
doc_markdown = "warn"
# Checks for usage of if expressions with an else if branch, but without a final else branch.
else_if_without_else = "deny"
# Checks for use Enum::*.
enum_glob_use = "warn"
# is_file doesn’t cover special file types in unix-like systems, and doesn’t cover symlink in windows.
# Using !FileType::is_dir() is a better way
filetype_is_file = "warn"
# Checks for usage of .to_string() on an &&T where T implements ToString directly (like &&str or &&String).
inefficient_to_string = "warn"
# Checks for usage of std::mem::forget(t) where t is Drop or has a field that implements Drop.
mem_forget = "warn"
# Checks the doc comments of publicly visible functions that return a Result type and warns if there is no # Errors section.
# missing_errors_doc = "warn"
# Checks the doc comments of publicly visible functions that may panic and warns if there is no # Panics section.
missing_panics_doc = "warn"
# Checks that module layout uses only self named module files; bans mod.rs files.
mod_module_files = "deny"
# Checks for multiple inherent implementations of a struct
multiple_inherent_impl = "warn"
# Checks for usage of Mutex<X> where an atomic will do.
mutex_atomic = "warn"
# Checks for usage of Mutex<X> where X is an integral type. Use Atomic instead.
mutex_integer = "warn"
# The lint checks for if-statements appearing in loops that contain a continue statement in either their main blocks or their else-blocks,
# when omitting the else-block possibly with some rearrangement of code can make the code easier to understand.
needless_continue = "warn"
# Checks for usage of panic!.
panic = "warn"
# Checks for temporaries returned from function calls in a match scrutinee that have the clippy::has_significant_drop attribute.
significant_drop_in_scrutinee = "warn"
# Checks for usage of todo!.
todo = "warn"
# Checks for usage of unimplemented!.
unimplemented = "warn"
# Checks for usage of unreachable!.
unreachable = "warn"
# Checks for wildcard dependencies in the Cargo.toml.
wildcard_dependencies = "deny"
# Checks for wildcard imports use _::*
wildcard_imports = "warn"