stevedonovan / chrono-english

Converting informal English dates (like `date` command) to chrono DateTime in Rust
MIT License
57 stars 14 forks source link

expose error types #5

Open softprops opened 6 years ago

softprops commented 6 years ago

the main signature of this create returns an error which is public but not exposed by a path external to this crate - https://docs.rs/chrono-english/0.1.3/chrono_english/fn.parse_date_string.html

this could be fixed if the errors mod was exposed as pub ( the default is private )

it's sometimes conventional to re-expose a type inside a package like errors at the top level of the crate with something like pub use errors::{DateResult,DateError}.

I'd be happy to submit a pul but I wanted to see what you thought first

grenewode commented 5 years ago

I'm also having issues with this. This pull request is from my fork where I have this fixed for my own usage, but all the tests pass and it seems to work.

stevedonovan commented 5 years ago

Sounds like a reasonable and easy thing to do! 0.1.4 has just been published exposing DateError and DateResult.

softprops commented 5 years ago

Thanks @stevedonovan

grenewode commented 5 years ago

Thanks! Closing my pull request as well.