Skip to content

Commit

Permalink
silence dead_code warnings for unread fields
Browse files Browse the repository at this point in the history
  • Loading branch information
pr2502 committed Aug 4, 2024
1 parent 247736b commit 586f8c9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/lsp/transport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ pub struct LspReader<R> {
/// For mor details see <https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#headerPart>.
pub struct Header {
pub content_length: usize,
#[allow(dead_code)]
pub content_type: Option<String>,
}

Expand Down
4 changes: 2 additions & 2 deletions src/socketwrapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<net::SocketAddr> for SocketAddr {
Expand Down

0 comments on commit 586f8c9

Please sign in to comment.