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:
david-perez 2022-03-15 21:36:18 +01:00 committed by GitHub
parent c059491a32
commit beeca577cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 0 additions and 7 deletions

View File

@ -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,

View File

@ -639,7 +639,6 @@ private class ServerHttpProtocolImplGenerator(
}
val errorSymbol = getDeserializePayloadErrorSymbol(binding)
val deserializer = httpBindingGenerator.generateDeserializePayloadFn(
operationShape,
binding,
errorSymbol,
structuredHandler = structureShapeHandler

View File

@ -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

View File

@ -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

View File

@ -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