Skip to content

Commit 1e65ce5

Browse files
fix: specify request type in route handler for clarity (#8623)
1 parent 7813f27 commit 1e65ce5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

rust/silent/src/main.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ async fn main() {
99
let route = Route::new("").get(index).append(
1010
Route::new("user")
1111
.append(
12-
Route::new("<id>").get(|req| async move { req.get_path_params::<String>("id") }),
12+
Route::new("<id>")
13+
.get(|req: Request| async move { req.get_path_params::<String>("id") }),
1314
)
1415
.post(index),
1516
);

0 commit comments

Comments
 (0)