Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve the api design in reader.rs #94

Open
lightsing opened this issue Aug 23, 2021 · 0 comments
Open

improve the api design in reader.rs #94

lightsing opened this issue Aug 23, 2021 · 0 comments

Comments

@lightsing
Copy link
Member

Usually, the "load" API should give a signature like fn <R: Read>(reader: R) -> Result<T, E>.
Current API with signature like fn (filename: &str) -> Result<T, E> can be preserved.
Also, load by filename should have a more generic signature like fn <P: AsRef<Path>>(path: P) -> Result<T, E>.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant