Centralize all import wrangling

This commit is contained in:
David Tolnay
2017-04-10 18:50:22 -07:00
parent 0b7accf86c
commit f88db0f547
13 changed files with 122 additions and 226 deletions
+3 -1
View File
@@ -1,3 +1,5 @@
use lib::*;
const TAG_CONT: u8 = 0b1000_0000;
const TAG_TWO_B: u8 = 0b1100_0000;
const TAG_THREE_B: u8 = 0b1110_0000;
@@ -43,6 +45,6 @@ pub struct Encode {
impl Encode {
// FIXME: use this from_utf8_unchecked, since we know it can never fail
pub fn as_str(&self) -> &str {
::core::str::from_utf8(&self.buf[self.pos..]).unwrap()
str::from_utf8(&self.buf[self.pos..]).unwrap()
}
}