From 586f8c916f2971149ef18e371e16207727e69248 Mon Sep 17 00:00:00 2001 From: max Date: Sun, 4 Aug 2024 21:18:48 +0200 Subject: [PATCH] silence dead_code warnings for unread fields --- src/lsp/transport.rs | 1 + src/socketwrapper.rs | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lsp/transport.rs b/src/lsp/transport.rs index dc6ad8c..9b95cb1 100644 --- a/src/lsp/transport.rs +++ b/src/lsp/transport.rs @@ -27,6 +27,7 @@ pub struct LspReader { /// For mor details see . pub struct Header { pub content_length: usize, + #[allow(dead_code)] pub content_type: Option, } diff --git a/src/socketwrapper.rs b/src/socketwrapper.rs index 53b618e..a662024 100644 --- a/src/socketwrapper.rs +++ b/src/socketwrapper.rs @@ -14,9 +14,9 @@ use tokio::net::{unix, UnixListener, UnixStream}; use crate::config::Address; pub enum SocketAddr { - Ip(net::SocketAddr), + Ip(#[allow(dead_code)] net::SocketAddr), #[cfg(target_family = "unix")] - Unix(tokio::net::unix::SocketAddr), + Unix(#[allow(dead_code)] tokio::net::unix::SocketAddr), } impl From for SocketAddr {