mirror of
https://github.com/actix/actix-extras.git
synced 2025-06-25 09:59:21 +02:00
Allow to use path without traling slashes for scope registration #241
This commit is contained in:
@ -374,9 +374,7 @@ fn test_scope_and_path_extractor() {
|
||||
App::new().scope("/sc", |scope| {
|
||||
scope.resource("/{num}/index.html", |r| {
|
||||
r.route()
|
||||
.with(|p: Path<(usize,)>| {
|
||||
format!("Welcome {}!", p.0)
|
||||
})
|
||||
.with(|p: Path<(usize,)>| format!("Welcome {}!", p.0))
|
||||
})
|
||||
})
|
||||
});
|
||||
@ -410,10 +408,9 @@ fn test_nested_scope_and_path_extractor() {
|
||||
App::new().scope("/sc", |scope| {
|
||||
scope.nested("/{num}", |scope| {
|
||||
scope.resource("/{num}/index.html", |r| {
|
||||
r.route()
|
||||
.with(|p: Path<(usize, usize)>| {
|
||||
format!("Welcome {} {}!", p.0, p.1)
|
||||
})
|
||||
r.route().with(|p: Path<(usize, usize)>| {
|
||||
format!("Welcome {} {}!", p.0, p.1)
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
Reference in New Issue
Block a user