From d28e5f57759d36244166d78e19481e63b43e2b34 Mon Sep 17 00:00:00 2001 From: Harry Barber Date: Tue, 24 Jan 2023 18:12:38 +0000 Subject: [PATCH 1/2] Fix `OperationExtensionFuture` poll order --- rust-runtime/aws-smithy-http-server/src/extension.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust-runtime/aws-smithy-http-server/src/extension.rs b/rust-runtime/aws-smithy-http-server/src/extension.rs index ce265bd7f2..33baa890b1 100644 --- a/rust-runtime/aws-smithy-http-server/src/extension.rs +++ b/rust-runtime/aws-smithy-http-server/src/extension.rs @@ -101,11 +101,11 @@ where fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll { 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 From d020c3e4519b423c4514a1f80d7651e4d80170ad Mon Sep 17 00:00:00 2001 From: Harry Barber Date: Wed, 25 Jan 2023 14:49:59 +0000 Subject: [PATCH 2/2] Add CHANGELOG.next.toml entry --- CHANGELOG.next.toml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.next.toml b/CHANGELOG.next.toml index fc4c4c2578..b456497a0a 100644 --- a/CHANGELOG.next.toml +++ b/CHANGELOG.next.toml @@ -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" \ No newline at end of file +# 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"