Add execute_winapi on SetStyle to fix Windows compilation (#690)
This commit is contained in:
parent
60e51be726
commit
c6a8952201
@ -74,6 +74,7 @@
|
|||||||
|
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::hash::{Hash, Hasher};
|
use std::hash::{Hash, Hasher};
|
||||||
|
use std::io;
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|
||||||
use bitflags::bitflags;
|
use bitflags::bitflags;
|
||||||
|
10
src/style.rs
10
src/style.rs
@ -366,6 +366,16 @@ impl Command for SetStyle {
|
|||||||
|
|
||||||
Ok(())
|
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.
|
/// A command that prints styled content.
|
||||||
|
Loading…
Reference in New Issue
Block a user