mirror of https://github.com/smithy-lang/smithy-rs
Fix `OperationExtensionFuture` poll order (#2247)
* Fix `OperationExtensionFuture` poll order * Add CHANGELOG.next.toml entry Co-authored-by: AWS SDK Rust Bot <97246200+aws-sdk-rust-ci@users.noreply.github.com>
This commit is contained in:
parent
d301e65efa
commit
ebdf59750a
|
@ -9,4 +9,10 @@
|
|||
# message = "Fix typos in module documentation for generated crates"
|
||||
# references = ["smithy-rs#920"]
|
||||
# meta = { "breaking" = false, "tada" = false, "bug" = false, "target" = "client | server | all"}
|
||||
# author = "rcoh"
|
||||
# author = "rcoh"
|
||||
|
||||
[[smithy-rs]]
|
||||
message = "Fix bug in `OperationExtensionFuture`s `Future::poll` implementation"
|
||||
references = ["smithy-rs#920"]
|
||||
meta = { "breaking" = false, "tada" = false, "bug" = true, "target" = "server"}
|
||||
author = "hlbarber"
|
||||
|
|
|
@ -101,11 +101,11 @@ where
|
|||
|
||||
fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
|
||||
let this = self.project();
|
||||
let resp = ready!(this.inner.try_poll(cx));
|
||||
let ext = this
|
||||
.operation_extension
|
||||
.take()
|
||||
.expect("futures cannot be polled after completion");
|
||||
let resp = ready!(this.inner.try_poll(cx));
|
||||
Poll::Ready(resp.map(|mut resp| {
|
||||
resp.extensions_mut().insert(ext);
|
||||
resp
|
||||
|
|
Loading…
Reference in New Issue