Skip to content

Commit

Permalink
Merge pull request #15 from anotherlusitano/fix-stupid-mistake
Browse files Browse the repository at this point in the history
Import KeyEventKind when the target_os is Windows
  • Loading branch information
anotherlusitano authored Aug 2, 2024
2 parents 8d9ec37 + a9701c5 commit 9e8c01f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "selthi"
version = "0.2.6"
version = "0.2.7"
edition = "2021"
author = "João Ribeiro"
repository = "https://github.com/anotherlusitano/selthi"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ cargo add selthi
\* If you want to support images, add the feature `with_images`

```
selthi = { version = "0.2.6", features = ["with_images"] }
selthi = { version = "0.2.7", features = ["with_images"] }
```

## Prompts
Expand Down
2 changes: 2 additions & 0 deletions src/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ use std::{
time::Duration,
};

#[cfg(target_os = "windows")]
use crossterm::event::KeyEventKind;
use crossterm::{
cursor,
event::{poll, read, Event, KeyCode, KeyModifiers},
Expand Down
2 changes: 2 additions & 0 deletions src/select.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ use std::{
time::Duration,
};

#[cfg(target_os = "windows")]
use crossterm::event::KeyEventKind;
use crossterm::{
cursor::{self, Hide, SetCursorStyle, Show},
event::{poll, read, Event, KeyCode, KeyModifiers},
Expand Down

0 comments on commit 9e8c01f

Please sign in to comment.