From 2e0052c244cd8483c07fc3d86a017f1e92366a17 Mon Sep 17 00:00:00 2001 From: Max Inden Date: Tue, 23 Jul 2024 13:56:10 +0200 Subject: [PATCH] chore(quinn): feature flag socket2 imports The `socket2` imports are only used by the feature flagged `client` function. Move the imports into the function to be feature flagged as well. Avoids the following warning: ``` --> quinn/src/endpoint.rs:28:15 | 28 | use socket2::{Domain, Protocol, Socket, Type}; | ^^^^^^ ^^^^^^^^ ^^^^^^ ^^^^ | = note: `#[warn(unused_imports)]` on by default ``` --- quinn/src/endpoint.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/quinn/src/endpoint.rs b/quinn/src/endpoint.rs index 3dd373fb5..d443b397c 100644 --- a/quinn/src/endpoint.rs +++ b/quinn/src/endpoint.rs @@ -25,6 +25,7 @@ use proto::{ EndpointEvent, ServerConfig, }; use rustc_hash::FxHashMap; +#[cfg(feature = "ring")] use socket2::{Domain, Protocol, Socket, Type}; use tokio::sync::{futures::Notified, mpsc, Notify}; use tracing::{Instrument, Span};