ebarnard / rust-plist

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

Implement 'std::convert::From' for Plist. #8

Closed zummenix closed 8 years ago

zummenix commented 8 years ago

Is it intentional to not implement?

ebarnard commented 8 years ago

What is the type you want to convert from?

zummenix commented 8 years ago

I was thinking about types that are defined in the Plist enum: Vec<Plist>, BTreeMap<String, Plist>, bool, Vec<u8>, DateTime<UTC>, f64, i64, String I'm not sure about other numeric types: f32, and all other integers that can be safely converted. It would be also convenient to implement From for slices: &[Plist], &[u8], &str. But I think it will be overkill.

zummenix commented 8 years ago

Turns out it's not that convenient as I thought. Closing for now.