Skip to content

Commit 97647c1

Browse files
authored
Merge pull request #10 from Turbo87/route-pattern
Add missing `pub` to the `RoutePattern` content
2 parents 7e8e3a3 + 29fbf26 commit 97647c1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/lib.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ pub struct RouteBuilder {
1717
#[derive(Clone, Copy)]
1818
pub struct RoutePattern(&'static str);
1919

20+
impl RoutePattern {
21+
pub fn pattern(&self) -> &str {
22+
self.0
23+
}
24+
}
25+
2026
pub struct WrappedHandler {
2127
pattern: RoutePattern,
2228
handler: Box<dyn Handler>,
@@ -260,7 +266,7 @@ mod tests {
260266
req.extensions()
261267
.find::<RoutePattern>()
262268
.unwrap()
263-
.0
269+
.pattern()
264270
.to_string(),
265271
);
266272

0 commit comments

Comments
 (0)