Unverified Commit 8ef9618b authored by 82marbag's avatar 82marbag Committed by GitHub
Browse files

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: default avatarDaniele Ahmed <ahmeddan@amazon.de>
parent b2535d8c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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> {
+1 −1
Original line number Diff line number Diff line
@@ -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> {