chore: prioritize http3-quinn over http3-s2n when both features are enabled (avoid compile error)

This commit is contained in:
Jun Kurihara 2023-12-09 00:17:59 +09:00
commit f7142828ac
No known key found for this signature in database
GPG key ID: 48ADFD173ED22B03
6 changed files with 14 additions and 17 deletions

View file

@ -2,7 +2,7 @@ mod proxy_h3;
mod proxy_main;
#[cfg(feature = "http3-quinn")]
mod proxy_quic_quinn;
#[cfg(feature = "http3-s2n")]
#[cfg(all(feature = "http3-s2n", not(feature = "http3-quinn")))]
mod proxy_quic_s2n;
mod socket;

View file

@ -15,7 +15,7 @@ use tokio::time::timeout;
#[cfg(feature = "http3-quinn")]
use h3::{quic::BidiStream, quic::Connection as ConnectionQuic, server::RequestStream};
#[cfg(feature = "http3-s2n")]
#[cfg(all(feature = "http3-s2n", not(feature = "http3-quinn")))]
use s2n_quic_h3::h3::{self, quic::BidiStream, quic::Connection as ConnectionQuic, server::RequestStream};
impl<U, T> Proxy<U, T>