Skip to content

Conversation

@npmccallum
Copy link
Contributor

The purpose of this transformation is for when the caller specifies type = "...". In that case, we decode into the specified type and then convert into
actual type. However, in cases where no type is specified, we have to decode
into an unspecified type T and then convert into the final type; but the
compiler (obviously) cannot determine the type T.

Therefore, when no type is specified, we drop the .try_into()? and just
attempt to decode into the final type directly.

Signed-off-by: Nathaniel McCallum nathaniel@profian.com

The purpose of this transformation is for when the caller specifies `type =
"..."`. In that case, we decode into the specified type and then convert into
actual type. However, in cases where no type is specified, we have to decode
into an unspecified type `T` and then convert into the final type; but the
compiler (obviously) cannot determine the type `T`.

Therefore, when no `type` is specified, we drop the `.try_into()?` and just
attempt to decode into the final type directly.

Signed-off-by: Nathaniel McCallum <nathaniel@profian.com>
@tarcieri tarcieri merged commit d2a78af into RustCrypto:master Feb 8, 2022
@tarcieri tarcieri mentioned this pull request May 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants