arcnmx / serde-ini

Windows INI file {de,}serialization
MIT License
19 stars 17 forks source link

de: add `from_*` methods #2

Closed lucab closed 6 years ago

lucab commented 6 years ago

This adds from_str and from_bufread methods to Deserializer. It also adds some basic integration testing.

lucab commented 6 years ago

This doesn't currently work, but I'm not sure how to fix and finish it. As Travis logs show, there is a mismatch in the iterator between String and &str. I tried to follow the chain and adjust types to make the string reader work (see leftover comments), but I broke the other reader in the process.

I didn't manage to figure out how to make both work, @arcnmx do you have any idea about what the proper iterator signature would be?

arcnmx commented 6 years ago

If you rebase/merge onto master that should help fix some of your type issues.

lucab commented 6 years ago

I saw you started picking up bits from here, thanks. I'm sorry but I was working on something else lately so I didn't have time to rebase this. I'll try to get back to it soon.

arcnmx commented 6 years ago

No rush, I mainly just wanted to bring the test in so I had something meaningful to run in CI. I can also finish the rest if you don't have the time to.

lucab commented 6 years ago

I've rebased and added top-level methods as well, PTAL.

arcnmx commented 6 years ago

Looks great, thanks!