plonkit icon indicating copy to clipboard operation
plonkit copied to clipboard

improve the api design in `reader.rs`

Open lightsing opened this issue 4 years ago • 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>.

lightsing avatar Aug 23 '21 06:08 lightsing