Skip to content

Commit

Permalink
chore(quinn): feature flag socket2 imports
Browse files Browse the repository at this point in the history
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
```
  • Loading branch information
mxinden authored and Ralith committed Jul 25, 2024
1 parent 78fbcee commit 2de91cf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions quinn/src/endpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down

0 comments on commit 2de91cf

Please sign in to comment.