Removed items from workspace

This commit is contained in:
Timon Post 2019-04-04 18:46:43 +02:00
parent 6cdce1bc25
commit 5f79acf9e9
4 changed files with 12 additions and 14 deletions

View File

@ -1,6 +1,6 @@
[package]
name = "crossterm"
version = "0.8.0"
version = "0.8.1"
authors = ["T. Post"]
description = "An crossplatform terminal library for manipulating terminals."
repository = "https://github.com/TimonPost/crossterm"
@ -29,8 +29,6 @@ members = [
"crossterm_terminal",
"crossterm_input",
"crossterm_screen",
"examples/program_examples/snake",
"examples/program_examples/first_depth_search"
]
[dependencies]
@ -51,8 +49,4 @@ path = "examples/program_examples/logging.rs"
[[example]]
name = "command_bar"
path = "examples/program_examples/command_bar.rs"
[[example]]
name = "snake"
path = "examples/program_examples/snake"
path = "examples/program_examples/command_bar.rs"

View File

@ -1,6 +1,8 @@
extern crate crossterm;
use crossterm::{input, ClearType, Crossterm, Screen, Terminal, TerminalCursor, InputEvent, KeyEvent};
use crossterm::{
input, ClearType, Crossterm, InputEvent, KeyEvent, Screen, Terminal, TerminalCursor,
};
use std::io::Read;
use std::sync::{Arc, Mutex};
@ -26,10 +28,10 @@ fn main() {
loop {
match stdin.next() {
Some(InputEvent::Keyboard(KeyEvent::Char('\n'))) => {
Some(InputEvent::Keyboard(KeyEvent::Char('\n'))) => {
input_buf.lock().unwrap().clear();
}
Some(InputEvent::Keyboard(KeyEvent::Char(character))) => {
Some(InputEvent::Keyboard(KeyEvent::Char(character))) => {
input_buf.lock().unwrap().push(character as char);
}
_ => {}

View File

@ -6,7 +6,7 @@ mod map;
mod messages;
mod variables;
use self::crossterm::{Color, Crossterm, Screen, ClearType, InputEvent, KeyEvent};
use self::crossterm::{ClearType, Color, Crossterm, InputEvent, KeyEvent, Screen};
use self::messages::WELCOME_MESSAGE;
use self::variables::{Position, Size};
@ -97,4 +97,3 @@ fn print_welcome_screen() {
thread::sleep(time::Duration::from_secs(1));
}
}

View File

@ -2,7 +2,10 @@ extern crate crossterm;
use crossterm::Screen;
use std::collections::VecDeque;
use std::sync::{Arc, Mutex, mpsc::{self, Receiver, Sender}};
use std::sync::{
mpsc::{self, Receiver, Sender},
Arc, Mutex,
};
use std::thread::{self, JoinHandle};
/// This is an que that could be shared between threads safely.