From a77ff4b84692bdd3cc5855d92c6de5588568962f Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sun, 28 Apr 2024 19:54:54 -0700 Subject: [PATCH] fix some warnings with newer rust The warning is that some of the variants are never read. In the case of ftwrap, they are referenced via ffi. For the other locations, we want them for debug purposes. --- wezterm-font/src/ftwrap.rs | 1 + wezterm-mux-server/src/daemonize.rs | 1 + wezterm-toast-notification/src/dbus.rs | 1 + wezterm/src/asciicast.rs | 1 + 4 files changed, 4 insertions(+) diff --git a/wezterm-font/src/ftwrap.rs b/wezterm-font/src/ftwrap.rs index 0d4bb50b4..5f06a3fb8 100644 --- a/wezterm-font/src/ftwrap.rs +++ b/wezterm-font/src/ftwrap.rs @@ -1294,6 +1294,7 @@ struct FreeTypeStream { name: String, } +#[allow(dead_code)] enum StreamBacking { File(BufReader), Map(Mmap), diff --git a/wezterm-mux-server/src/daemonize.rs b/wezterm-mux-server/src/daemonize.rs index c661750b5..ba4e7db03 100644 --- a/wezterm-mux-server/src/daemonize.rs +++ b/wezterm-mux-server/src/daemonize.rs @@ -5,6 +5,7 @@ use std::io::Write; use std::os::unix::io::{AsRawFd, IntoRawFd, RawFd}; enum Fork { + #[allow(dead_code)] Child(pid_t), Parent(pid_t), } diff --git a/wezterm-toast-notification/src/dbus.rs b/wezterm-toast-notification/src/dbus.rs index 2ae2a2afe..d00f034d2 100644 --- a/wezterm-toast-notification/src/dbus.rs +++ b/wezterm-toast-notification/src/dbus.rs @@ -71,6 +71,7 @@ enum Reason { Expired, Dismissed, Closed, + #[allow(dead_code)] Unknown(u32), } diff --git a/wezterm/src/asciicast.rs b/wezterm/src/asciicast.rs index 13c20defc..9ea044816 100644 --- a/wezterm/src/asciicast.rs +++ b/wezterm/src/asciicast.rs @@ -626,6 +626,7 @@ impl PlayCommand { } } +#[allow(dead_code)] #[derive(Debug)] enum Summarized { Action(Action),