fluidex/plonkit

improve the api design in `reader.rs`

lightsing opened this issue · 0 comments

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>.