ebarnard / rust-plist

A rusty plist parser.
MIT License
71 stars 42 forks source link

Plist::read and Plist::from_event should can return error, not just () #6

Closed defuz closed 8 years ago

defuz commented 8 years ago

I think signature of this methods should be like:

   pub fn read<R: Read + Seek>(reader: R) -> Result<Plist, PlistError>
   pub fn from_events<T>(events: T) -> Result<Plist, PlistError>

Where PlistError is re-export of builder::BuildError that is private now.

Without this feature, parsing stream into Plist with normal error handling is impossible, since builder mod is private.

ebarnard commented 8 years ago

Fixed in 0.0.12