Skip to content

Commit 1607df3

Browse files
committed
fix clippy lints
1 parent 04a3b85 commit 1607df3

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

src/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ impl MergeError {
117117
impl fmt::Display for MergeError {
118118
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
119119
for error in self.0.iter() {
120-
writeln!(f, "{}", error)?;
120+
writeln!(f, "{error}")?;
121121
}
122122

123123
Ok(())

src/lib.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,13 @@ by the number of children with registered values, increasing the chance of choos
123123
As it turns out, this method of routing is extremely fast. See the [benchmark results](https://github.com/ibraheemdev/matchit?tab=readme-ov-file#benchmarks) for details.
124124
*/
125125

126-
#![deny(rust_2018_idioms, clippy::all)]
126+
#![deny(
127+
missing_debug_implementations,
128+
missing_docs,
129+
dead_code,
130+
unsafe_op_in_unsafe_fn,
131+
rustdoc::broken_intra_doc_links
132+
)]
127133

128134
mod error;
129135
mod escape;

src/params.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,15 @@ impl<'k, 'v> Param<'k, 'v> {
2727
}
2828
}
2929

30+
impl<'k, 'v> fmt::Debug for Param<'k, 'v> {
31+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
32+
f.debug_struct("Param")
33+
.field("key", &self.key_str())
34+
.field("value", &self.value_str())
35+
.finish()
36+
}
37+
}
38+
3039
/// A list of parameters returned by a route match.
3140
///
3241
/// ```rust
@@ -174,6 +183,7 @@ impl fmt::Debug for Params<'_, '_> {
174183
}
175184

176185
/// An iterator over the keys and values of a route's [parameters](crate::Params).
186+
#[derive(Debug)]
177187
pub struct ParamsIter<'ps, 'k, 'v> {
178188
kind: ParamsIterKind<'ps, 'k, 'v>,
179189
}
@@ -188,6 +198,7 @@ impl<'ps, 'k, 'v> ParamsIter<'ps, 'k, 'v> {
188198
}
189199
}
190200

201+
#[derive(Debug)]
191202
enum ParamsIterKind<'ps, 'k, 'v> {
192203
Small(iter::Take<slice::Iter<'ps, Param<'k, 'v>>>),
193204
Large(slice::Iter<'ps, Param<'k, 'v>>),

0 commit comments

Comments
 (0)