From 3417707e5e2079dd49aa9c5d5e426260a4887374 Mon Sep 17 00:00:00 2001 From: Max Inden Date: Thu, 29 Feb 2024 12:53:32 +0100 Subject: [PATCH] fix: feature flag Datagram::into_data `Datagram::into_data` is used in `neqo_common::udp` only. `neqo_common::udp` is behind the `udp` feature. The feature is not part of the crate's default features. Thus a plain `cargo check` rightly complains with: ``` warning: method `into_data` is never used --> neqo-common/src/datagram.rs:58:19 | 20 | impl Datagram { | ------------- method in this implementation ... 58 | pub(crate) fn into_data(self) -> Vec { | ^^^^^^^^^ | = note: `#[warn(dead_code)]` on by default ``` This commit hides `into_data` behind the `udp` feature as well. --- neqo-common/src/datagram.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/neqo-common/src/datagram.rs b/neqo-common/src/datagram.rs index d6ed43bde1..04ba1a45a1 100644 --- a/neqo-common/src/datagram.rs +++ b/neqo-common/src/datagram.rs @@ -54,6 +54,7 @@ impl Datagram { self.ttl } + #[cfg(feature = "udp")] #[must_use] pub(crate) fn into_data(self) -> Vec { self.d