mirror of https://github.com/smithy-lang/smithy-rs
TryFrom with lifetimes (#3303)
## Description Lifetimes in `TryFrom`, see: #3249 ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._ Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>
This commit is contained in:
parent
b2535d8c3d
commit
8ef9618b37
|
@ -415,7 +415,7 @@ class ServerBuilderGenerator(
|
|||
private fun renderTryFromBuilderImpl(writer: RustWriter) {
|
||||
writer.rustTemplate(
|
||||
"""
|
||||
impl #{TryFrom}<Builder $lifetime> for #{Structure}$lifetime {
|
||||
impl $lifetime #{TryFrom}<Builder $lifetime> for #{Structure}$lifetime {
|
||||
type Error = ConstraintViolation;
|
||||
|
||||
fn try_from(builder: Builder $lifetime) -> Result<Self, Self::Error> {
|
||||
|
|
|
@ -239,7 +239,7 @@ class ServerBuilderGeneratorWithoutPublicConstrainedTypes(
|
|||
private fun renderTryFromBuilderImpl(writer: RustWriter) {
|
||||
writer.rustTemplate(
|
||||
"""
|
||||
impl #{TryFrom}<Builder $lifetime> for #{Structure}$lifetime {
|
||||
impl $lifetime #{TryFrom}<Builder $lifetime> for #{Structure}$lifetime {
|
||||
type Error = ConstraintViolation;
|
||||
|
||||
fn try_from(builder: Builder $lifetime) -> Result<Self, Self::Error> {
|
||||
|
|
Loading…
Reference in New Issue