Merge pull request #1 from skade/move-to-stable

Move to stable
This commit is contained in:
Ticki 2016-03-08 11:17:25 +01:00
commit 7f52ce9a80
3 changed files with 5 additions and 7 deletions

View File

@ -4,3 +4,4 @@ version = "0.1.0"
authors = ["Ticki <Ticki@users.noreply.github.com>"] authors = ["Ticki <Ticki@users.noreply.github.com>"]
[dependencies] [dependencies]
libc = "0.2.8"

View File

@ -15,12 +15,12 @@ impl<R: Read> ReadExt for R {
let _raw = try!(writer.into_raw_mode()); let _raw = try!(writer.into_raw_mode());
let mut string = String::with_capacity(30); let mut string = String::with_capacity(30);
for c in self.chars() { for c in self.bytes() {
match c { match c {
Err(_) => return Err(TerminalError::StdinError), Err(_) => return Err(TerminalError::StdinError),
Ok('\0') | Ok('\x03') | Ok('\x04') => return Ok(None), Ok(b'\0') | Ok(b'\x03') | Ok(b'\x04') => return Ok(None),
Ok('\n') | Ok('\r') => return Ok(Some(string)), Ok(b'\n') | Ok(b'\r') => return Ok(Some(string)),
Ok(c) => string.push(c), Ok(c) => string.push(c as char),
} }
} }

View File

@ -1,6 +1,3 @@
#![feature(io)]
#![feature(libc)]
#[warn(missing_docs)] #[warn(missing_docs)]
#[cfg(not(target_os = "redox"))] #[cfg(not(target_os = "redox"))]