Skip to content

Commit 267dc9d

Browse files
committed
clippy
1 parent 7b4e074 commit 267dc9d

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,14 +232,14 @@ impl<T> PathTree<T> {
232232
}
233233

234234
/// Gets the route by id.
235-
#[allow(clippy::must_use_candidate)]
235+
#[must_use]
236236
#[inline]
237237
pub fn get_route(&self, index: usize) -> Option<&(T, Vec<Piece>)> {
238238
self.routes.get(index)
239239
}
240240

241241
/// Generates URL with the params.
242-
#[allow(clippy::must_use_candidate)]
242+
#[must_use]
243243
pub fn url_for(&self, index: usize, params: &[&str]) -> Option<String> {
244244
self.get_route(index).and_then(|(_, pieces)| {
245245
let mut bytes = Vec::new();

tests/node.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ fn github_nodes() {
9191

9292
assert_eq!(
9393
format!("{node:?}"),
94-
r#"
94+
r"
9595
/
9696
├── 404
9797
├── 50
@@ -183,6 +183,6 @@ fn github_nodes() {
183183
└── :
184184
└── /
185185
└── :
186-
"#
186+
"
187187
);
188188
}

tests/tree.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1951,7 +1951,7 @@ fn github_tree() {
19511951

19521952
assert_eq!(
19531953
format!("{:?}", &tree.node),
1954-
r#"
1954+
r"
19551955
/ •0
19561956
├── 404 •67
19571957
├── 50
@@ -2124,7 +2124,7 @@ fn github_tree() {
21242124
│ └── /
21252125
│ └── : •84
21262126
└── ** •110
2127-
"#
2127+
"
21282128
);
21292129

21302130
let (h, p) = tree.find("/rust-lang/rust").unwrap();

0 commit comments

Comments
 (0)