aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEdward Barnard2018-04-30 13:08:28 +0100
committerEdward Barnard2018-05-01 10:44:45 +0100
commit99860e4ee260cd072b8c261b85edb27d5af6c204 (patch)
tree9b9a816999dfb9b47844d172f1e254cfec2fd2f6 /src
parenta4963e97eff1fd7d465854f2a5e9a155b60c7ab2 (diff)
downloadrust-plist-99860e4ee260cd072b8c261b85edb27d5af6c204.tar.bz2
Improve doc output by not renaming std::io::Error to IoError and not creating a public type alias for Result<T, Error>.
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 22cd9a8..ddcce58 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -81,8 +81,7 @@ extern crate serde as serde_base;
pub mod serde;
use std::fmt;
-use std::io::{Read, Seek, SeekFrom};
-use std::io::Error as IoError;
+use std::io::{self, Read, Seek, SeekFrom};
/// An encoding of a plist as a flat structure.
///
@@ -116,13 +115,13 @@ pub enum PlistEvent {
StringValue(String),
}
-pub type Result<T> = ::std::result::Result<T, Error>;
+type Result<T> = ::std::result::Result<T, Error>;
#[derive(Debug)]
pub enum Error {
InvalidData,
UnexpectedEof,
- Io(IoError),
+ Io(io::Error),
Serde(String),
}
@@ -153,8 +152,8 @@ impl fmt::Display for Error {
}
}
-impl From<IoError> for Error {
- fn from(err: IoError) -> Error {
+impl From<io::Error> for Error {
+ fn from(err: io::Error) -> Error {
Error::Io(err)
}
}