From 6e251fb7ab914adef4a989c669e564ec96d68c56 Mon Sep 17 00:00:00 2001 From: Charlie Groves Date: Sun, 24 Jul 2022 17:58:35 -0400 Subject: [PATCH 1/2] Add execute_winapi on SetStyle to fix Windows compilation --- src/style.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/style.rs b/src/style.rs index c54315885..f4cd55433 100644 --- a/src/style.rs +++ b/src/style.rs @@ -366,6 +366,16 @@ impl Command for SetStyle { Ok(()) } + + #[cfg(windows)] + fn execute_winapi(&self) -> Result<()> { + panic!("tried to execute SetStyle command using WinAPI, use ANSI instead"); + } + + #[cfg(windows)] + fn is_ansi_code_supported(&self) -> bool { + true + } } /// A command that prints styled content. From e4d16b1d8846b60b18485d0aa9951166a599faef Mon Sep 17 00:00:00 2001 From: Charlie Groves Date: Mon, 25 Jul 2022 09:55:40 -0400 Subject: [PATCH 2/2] Fix another Windows compilation failure that was introduced --- src/event.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/event.rs b/src/event.rs index d3152b45a..accc19c1d 100644 --- a/src/event.rs +++ b/src/event.rs @@ -74,6 +74,7 @@ use std::fmt; use std::hash::{Hash, Hasher}; +use std::io; use std::time::Duration; use bitflags::bitflags;