Reverted some version number

This commit is contained in:
Timon Post 2019-04-02 22:23:38 +02:00
parent 6ff20aadda
commit 6f1aa220c6
7 changed files with 7 additions and 11 deletions

View File

@ -1,6 +1,6 @@
[package] [package]
name = "crossterm" name = "crossterm"
version = "0.8.0" version = "0.7.0"
authors = ["T. Post"] authors = ["T. Post"]
description = "An crossplatform terminal library for manipulating terminals." description = "An crossplatform terminal library for manipulating terminals."
repository = "https://github.com/TimonPost/crossterm" repository = "https://github.com/TimonPost/crossterm"
@ -36,7 +36,7 @@ crossterm_screen = { optional = true, version = "0.1.0" }
crossterm_cursor = { optional = true, version = "0.1.0" } crossterm_cursor = { optional = true, version = "0.1.0" }
crossterm_terminal = { optional = true, version = "0.1.0" } crossterm_terminal = { optional = true, version = "0.1.0" }
crossterm_style = { optional = true, version = "0.2.0" } crossterm_style = { optional = true, version = "0.2.0" }
crossterm_input = { optional = true, version = "0.2.0" } crossterm_input = { optional = true, version = "0.1.0" }
crossterm_utils = { version = "0.1.0" } crossterm_utils = { version = "0.1.0" }
[lib] [lib]

View File

@ -13,7 +13,7 @@ edition = "2018"
[target.'cfg(windows)'.dependencies] [target.'cfg(windows)'.dependencies]
winapi = { version = "0.3.5", features = ["wincon","winnt","minwindef"] } winapi = { version = "0.3.5", features = ["wincon","winnt","minwindef"] }
crossterm_winapi = "0.1.2" crossterm_winapi = "0.1.1"
[dependencies] [dependencies]
crossterm_utils = "0.1.0" crossterm_utils = "0.1.0"

View File

@ -126,7 +126,6 @@ pub struct SyncReader;
/// - Threads spawned will be disposed of as soon the `AsyncReader` goes out of scope. /// - Threads spawned will be disposed of as soon the `AsyncReader` goes out of scope.
/// - MPSC-channels are used to queue input events, this type implements an iterator of the rx side of the queue. /// - MPSC-channels are used to queue input events, this type implements an iterator of the rx side of the queue.
pub struct AsyncReader { pub struct AsyncReader {
function: Box<Fn(&Sender<u8>, &Arc<AtomicBool>) + Send>,
event_rx: Receiver<u8>, event_rx: Receiver<u8>,
shutdown: Arc<AtomicBool>, shutdown: Arc<AtomicBool>,
} }
@ -140,14 +139,11 @@ impl AsyncReader {
let (event_tx, event_rx) = mpsc::channel(); let (event_tx, event_rx) = mpsc::channel();
let thread_shutdown = shutdown_handle.clone(); let thread_shutdown = shutdown_handle.clone();
let function = function.function;
thread::spawn(move || loop { thread::spawn(move || loop {
function(&event_tx, &thread_shutdown); function(&event_tx, &thread_shutdown);
}); });
AsyncReader { AsyncReader {
function,
event_rx, event_rx,
shutdown: shutdown_handle, shutdown: shutdown_handle,
} }

View File

@ -16,4 +16,4 @@ crossterm_utils = "0.1.0"
[target.'cfg(windows)'.dependencies] [target.'cfg(windows)'.dependencies]
winapi = { version = "0.3.5", features = ["minwindef", "wincon"] } winapi = { version = "0.3.5", features = ["minwindef", "wincon"] }
crossterm_winapi = "0.1.2" crossterm_winapi = "0.1.1"

View File

@ -13,7 +13,7 @@ edition = "2018"
[target.'cfg(windows)'.dependencies] [target.'cfg(windows)'.dependencies]
winapi = { version = "0.3.5", features = ["wincon"] } winapi = { version = "0.3.5", features = ["wincon"] }
crossterm_winapi = "0.1.2" crossterm_winapi = "0.1.1"
[dependencies] [dependencies]
crossterm_utils = "0.1.0" crossterm_utils = "0.1.0"

View File

@ -12,7 +12,7 @@ readme = "README.md"
edition = "2018" edition = "2018"
[target.'cfg(windows)'.dependencies] [target.'cfg(windows)'.dependencies]
crossterm_winapi = "0.1.2" crossterm_winapi = "0.1.1"
[target.'cfg(unix)'.dependencies] [target.'cfg(unix)'.dependencies]
libc = "0.2.43" libc = "0.2.43"

View File

@ -5,7 +5,7 @@ authors = ["Timon Post <timonpost@hotmail.nl>"]
edition = "2018" edition = "2018"
[target.'cfg(windows)'.dependencies] [target.'cfg(windows)'.dependencies]
crossterm_winapi = "0.1.2" crossterm_winapi = "0.1.1"
winapi = { version = "0.3.5", features = ["wincon"] } winapi = { version = "0.3.5", features = ["wincon"] }
[target.'cfg(unix)'.dependencies] [target.'cfg(unix)'.dependencies]