aboutsummaryrefslogtreecommitdiff
path: root/utf8parse/src
diff options
context:
space:
mode:
authorM Farkas-Dyck <strake888@gmail.com>2017-11-18 18:38:31 -0800
committerJoe Wilm <jwilm@users.noreply.github.com>2017-11-18 18:38:31 -0800
commit7d71f6a02a4bbd00805c91388f257198c1173912 (patch)
tree1d23ce6b20147c7775e8ae32c5d6332aabefada0 /utf8parse/src
parent2be387f7efba8871ad85b5a22fb275323efa462c (diff)
downloadr-alacritty-vte-7d71f6a02a4bbd00805c91388f257198c1173912.tar.gz
r-alacritty-vte-7d71f6a02a4bbd00805c91388f257198c1173912.tar.bz2
r-alacritty-vte-7d71f6a02a4bbd00805c91388f257198c1173912.zip
no_std (#9)
Diffstat (limited to 'utf8parse/src')
-rw-r--r--utf8parse/src/lib.rs6
-rw-r--r--utf8parse/src/types.rs2
2 files changed, 6 insertions, 2 deletions
diff --git a/utf8parse/src/lib.rs b/utf8parse/src/lib.rs
index e75f197..dc4b0fa 100644
--- a/utf8parse/src/lib.rs
+++ b/utf8parse/src/lib.rs
@@ -3,7 +3,9 @@
//! This module implements a table-driven UTF-8 parser which should
//! theoretically contain the minimal number of branches (1). The only branch is
//! on the `Action` returned from unpacking a transition.
-use std::char;
+#![no_std]
+
+use core::char;
mod types;
use self::types::{State, Action, unpack};
@@ -94,6 +96,8 @@ impl Parser {
#[cfg(test)]
mod tests {
+ extern crate std;
+
use std::io::Read;
use std::fs::File;
use Receiver;
diff --git a/utf8parse/src/types.rs b/utf8parse/src/types.rs
index 4c604f4..a5b9436 100644
--- a/utf8parse/src/types.rs
+++ b/utf8parse/src/types.rs
@@ -1,6 +1,6 @@
//! Types supporting the UTF-8 parser
#![allow(non_camel_case_types)]
-use std::mem;
+use core::mem;
/// States the parser can be in.
///