mirror of https://github.com/smithy-lang/smithy-rs
Make `generateDeserializePayloadFn` not take in an operation shape (#1250)
The binding generator class is already scoped to a single operation shape stored as a property.
This commit is contained in:
parent
c059491a32
commit
beeca577cb
|
@ -25,12 +25,10 @@ class ServerRequestBindingGenerator(
|
|||
httpBindingGenerator.generateDeserializeHeaderFn(binding)
|
||||
|
||||
fun generateDeserializePayloadFn(
|
||||
operationShape: OperationShape,
|
||||
binding: HttpBindingDescriptor,
|
||||
errorT: RuntimeType,
|
||||
structuredHandler: RustWriter.(String) -> Unit
|
||||
): RuntimeType = httpBindingGenerator.generateDeserializePayloadFn(
|
||||
operationShape,
|
||||
binding,
|
||||
errorT,
|
||||
structuredHandler,
|
||||
|
|
|
@ -639,7 +639,6 @@ private class ServerHttpProtocolImplGenerator(
|
|||
}
|
||||
val errorSymbol = getDeserializePayloadErrorSymbol(binding)
|
||||
val deserializer = httpBindingGenerator.generateDeserializePayloadFn(
|
||||
operationShape,
|
||||
binding,
|
||||
errorSymbol,
|
||||
structuredHandler = structureShapeHandler
|
||||
|
|
|
@ -173,7 +173,6 @@ class HttpBindingGenerator(
|
|||
* Generate a function to deserialize `[binding]` from the request / response payload.
|
||||
*/
|
||||
fun generateDeserializePayloadFn(
|
||||
operationShape: OperationShape,
|
||||
binding: HttpBindingDescriptor,
|
||||
errorT: RuntimeType,
|
||||
// Deserialize a single structure, union or document member marked as a payload
|
||||
|
|
|
@ -26,12 +26,10 @@ class ResponseBindingGenerator(
|
|||
httpBindingGenerator.generateDeserializePrefixHeaderFn(binding)
|
||||
|
||||
fun generateDeserializePayloadFn(
|
||||
operationShape: OperationShape,
|
||||
binding: HttpBindingDescriptor,
|
||||
errorT: RuntimeType,
|
||||
payloadParser: RustWriter.(String) -> Unit
|
||||
): RuntimeType = httpBindingGenerator.generateDeserializePayloadFn(
|
||||
operationShape,
|
||||
binding,
|
||||
errorT,
|
||||
payloadParser
|
||||
|
|
|
@ -350,7 +350,6 @@ class HttpBoundProtocolTraitImplGenerator(
|
|||
rust("#T($body).map_err(#T::unhandled)", structuredDataParser.payloadParser(member), errorSymbol)
|
||||
}
|
||||
val deserializer = httpBindingGenerator.generateDeserializePayloadFn(
|
||||
operationShape,
|
||||
binding,
|
||||
errorSymbol,
|
||||
payloadParser = payloadParser
|
||||
|
|
Loading…
Reference in New Issue