Skip to content

Commit c176843

Browse files
Use natural member order to construct binding list
1 parent 90ad392 commit c176843

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/smithy-http/src/smithy_http/bindings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,13 @@ def __init__(self, struct: Schema, response_status: int) -> None:
7676
self.response_status = response_status
7777
found_body = False
7878
found_payload = False
79-
self.bindings = [Binding.BODY] * len(struct.members)
79+
self.bindings = []
8080
self.payload_member = None
8181
self.event_stream_member = None
8282

8383
for member in struct.members.values():
8484
binding = self._do_match(member)
85-
self.bindings[member.expect_member_index()] = binding
85+
self.bindings.append(binding)
8686
found_body = (
8787
found_body or binding is Binding.BODY or binding is Binding.HOST
8888
)

0 commit comments

Comments
 (0)