We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 7e8e3a3 + 29fbf26 commit 97647c1Copy full SHA for 97647c1
src/lib.rs
@@ -17,6 +17,12 @@ pub struct RouteBuilder {
17
#[derive(Clone, Copy)]
18
pub struct RoutePattern(&'static str);
19
20
+impl RoutePattern {
21
+ pub fn pattern(&self) -> &str {
22
+ self.0
23
+ }
24
+}
25
+
26
pub struct WrappedHandler {
27
pattern: RoutePattern,
28
handler: Box<dyn Handler>,
@@ -260,7 +266,7 @@ mod tests {
260
266
req.extensions()
261
267
.find::<RoutePattern>()
262
268
.unwrap()
263
- .0
269
+ .pattern()
264
270
.to_string(),
265
271
);
272
0 commit comments