aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib.rs
diff options
context:
space:
mode:
authorEdward Barnard2015-08-28 15:52:54 +0700
committerEdward Barnard2015-08-28 15:52:54 +0700
commitb0b34ef55e1d8a3783b7ddfbf5612b9176b20e66 (patch)
tree9161c6fd4e9ade5008151f6b014b3af298ef7207 /src/lib.rs
parent8b1d9bba631334fc16229a419370deb1800b21bf (diff)
downloadrust-plist-b0b34ef55e1d8a3783b7ddfbf5612b9176b20e66.tar.bz2
Remove dependency on rust-encoding
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 2d0bc79..c80ffb1 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,5 +1,4 @@
extern crate byteorder;
-extern crate encoding;
extern crate itertools;
extern crate rustc_serialize;
extern crate xml as xml_rs;
@@ -11,6 +10,7 @@ use byteorder::Error as ByteorderError;
use std::collections::HashMap;
use std::io::{Read, Seek, SeekFrom};
use std::io::Error as IoError;
+use std::string::FromUtf16Error;
#[derive(Clone, Debug, PartialEq)]
pub enum Plist {
@@ -74,6 +74,12 @@ impl From<ByteorderError> for ParserError {
}
}
+impl From<FromUtf16Error> for ParserError {
+ fn from(_: FromUtf16Error) -> ParserError {
+ ParserError::InvalidData
+ }
+}
+
pub enum StreamingParser<R: Read+Seek> {
Xml(xml::StreamingParser<R>),
Binary(binary::StreamingParser<R>)