Skip to content

Conversation

@tarcieri
Copy link
Member

@tarcieri tarcieri commented Jan 1, 2023

Replaces use of dyn Writer with impl Writer.

Removes the Sequence::fields method, which was used for a blanket impl of EncodeValue.

Instead, very small changes to the custom derive can be used to derive a monomorphic implementation of EncodeValue that doesn't rely on trait objects, where calls to the Writer can be potentially inlined.

Replaces use of `dyn Writer` with `impl Writer`.

Removes the `Sequence::fields` method, which was used for a blanket
impl of `EncodeValue`.

Instead, very small changes to the custom derive can be used to derive a
monomorphic implementation of `EncodeValue` that doesn't rely on trait
objects, where calls to the `Writer` can be potentially inlined.
@tarcieri
Copy link
Member Author

tarcieri commented Jan 1, 2023

NOTE: der and der_derive have been updated. Everything else still needs to be updated.

Everything should be updated now.

@tarcieri tarcieri changed the title [WIP] der: eliminate dynamism from encoding der: eliminate dynamism from encoding Jan 1, 2023
@tarcieri tarcieri marked this pull request as ready for review January 1, 2023 20:14
@tarcieri
Copy link
Member Author

tarcieri commented Jan 1, 2023

Thanks to its use of custom derive, no changes to x509-cert seem to be required, which is pretty neat.

@tarcieri tarcieri merged commit 4e2a5ee into master Jan 1, 2023
@tarcieri tarcieri deleted the der/remove-encoding-dynamism branch January 1, 2023 20:31
@tarcieri tarcieri mentioned this pull request Feb 27, 2023
tarcieri added a commit that referenced this pull request Feb 28, 2023
Regression where the version number was lost from the encoder as part of
the changes in #828.

It wasn't caught due to a lack of an encoding test, which has been added
in this PR.
tarcieri added a commit that referenced this pull request Feb 28, 2023
Regression where the version number was lost from the encoder as part of
the changes in #828.

It wasn't caught due to a lack of an encoding test, which has been added
in this PR.
tarcieri added a commit that referenced this pull request Feb 28, 2023
Regression where the version number was lost from the encoder as part of
the changes in #828.

It wasn't caught due to a lack of an encoding test, which has been added
in this PR.
tarcieri added a commit that referenced this pull request Feb 28, 2023
Regression where the version number was lost from the encoder as part of
the changes in #828.

It wasn't caught due to a lack of an encoding test, which has been added
in this PR.
tarcieri added a commit that referenced this pull request Feb 28, 2023
Regression where the version number was lost from the encoder as part of
the changes in #828.

It wasn't caught due to a lack of an encoding test, which has been added
in this PR.
tarcieri added a commit that referenced this pull request Feb 28, 2023
Regression where the version number was lost from the encoder as part of
the changes in #828.

It wasn't caught due to a lack of an encoding test, which has been added
in this PR.
tarcieri added a commit that referenced this pull request Feb 28, 2023
Regression where the version number was lost from the encoder as part of
the changes in #828.

It wasn't caught due to a lack of an encoding test, which has been added
in this PR.
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