Skip to content

Commit

Permalink
fix(s2n-quic): Switch providers to not use opaque types (#1821)
Browse files Browse the repository at this point in the history
The Rust compiler deals poorly with the signature of our providers,
leading to exponential compile times with additional providers. In one
real-world case this patch changes `cargo check` compile times from 6
minutes to 20 seconds, which is a significant delta. The tradeoff with
the current compiler is somewhat more verbose error messages, but given
the potentially massive wins in compile time for users of this crate
that seems worth it.
  • Loading branch information
Mark-Simulacrum authored Jun 20, 2023
1 parent ac0a964 commit b614a16
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion quic/s2n-quic/src/provider/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ macro_rules! impl_provider_method {
$(
#[$($attr)*]
)*
pub fn $name<T, U>(self, $field: T) -> Result<Builder<impl $trait>, T::Error>
pub fn $name<T, U>(self, $field: T) -> Result<Builder<U>, T::Error>
where
T: $field::TryInto,
U: $trait,
Expand Down

0 comments on commit b614a16

Please sign in to comment.