Update win_commands.rs
Removed panic! lines. See [this](https://github.com/TimonPost/crossterm/issues/15) issue
This commit is contained in:
parent
7f17df8677
commit
f63c58b889
@ -38,14 +38,12 @@ impl ICommand for EnableAnsiCommand
|
||||
let mut dw_mode: DWORD = 0;
|
||||
if !kernel::get_console_mode(&output_handle, &mut dw_mode)
|
||||
{
|
||||
panic!("Cannot get console mode");
|
||||
return false;
|
||||
}
|
||||
|
||||
dw_mode |= self.mask;
|
||||
if !kernel::set_console_mode(&output_handle, dw_mode)
|
||||
{
|
||||
panic!("Cannot get console mode");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user