diff options
| author | Edward Barnard | 2018-04-30 13:08:28 +0100 |
|---|---|---|
| committer | Edward Barnard | 2018-05-01 10:44:45 +0100 |
| commit | 99860e4ee260cd072b8c261b85edb27d5af6c204 (patch) | |
| tree | 9b9a816999dfb9b47844d172f1e254cfec2fd2f6 /src | |
| parent | a4963e97eff1fd7d465854f2a5e9a155b60c7ab2 (diff) | |
| download | rust-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.rs | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -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) } } |
