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:
82marbag 2023-12-12 13:31:57 +00:00 committed by GitHub
parent b2535d8c3d
commit 8ef9618b37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

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

View File

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