Skip to content

Commit

Permalink
TryFrom with lifetimes (#3303)
Browse files Browse the repository at this point in the history
## 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>
  • Loading branch information
82marbag authored Dec 12, 2023
1 parent b2535d8 commit 8ef9618
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down

0 comments on commit 8ef9618

Please sign in to comment.