Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix type confusion in some scenarios #3348

Merged
merged 3 commits into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions actix-web/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
### Changed

- Minimum supported Rust version (MSRV) is now 1.72.
- Avoid type confusion in rare circumstances

## 4.5.1

Expand Down
5 changes: 3 additions & 2 deletions actix-web/src/app_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,9 @@ impl ServiceFactory<ServiceRequest> for AppRoutingFactory {
let guards = guards.borrow_mut().take().unwrap_or_default();
let factory_fut = factory.new_service(());
async move {
let service = factory_fut.await?;
Ok((path, guards, service))
factory_fut
.await
.map(move |service| (path, guards, service))
}
}));

Expand Down
5 changes: 3 additions & 2 deletions actix-web/src/scope.rs
Original file line number Diff line number Diff line change
Expand Up @@ -470,8 +470,9 @@ impl ServiceFactory<ServiceRequest> for ScopeFactory {
let guards = guards.borrow_mut().take().unwrap_or_default();
let factory_fut = factory.new_service(());
async move {
let service = factory_fut.await?;
Ok((path, guards, service))
factory_fut
.await
.map(move |service| (path, guards, service))
}
}));

Expand Down