Open ExpHP opened 5 years ago
This is a small thing I need for some of the unit tests I'm adding to #15.
In order to be backwards compatible, OutFile becomes a type alias for a new, more general type:
OutFile
pub struct NpyWriter<T: npy::Serializable, W: io::Write + io::Seek> { ... } impl<T: npy::Serializable, W: io::Write + io::Seek> NpyWriter { pub fn begin(W) -> io::Result<Self>; pub fn push(&mut self, &T) -> io::Result<()>; pub fn finish(self) -> io::Result<()>; } pub type OutFile<T> = NpyWriter<T, BufWriter<File>>;
close was renamed to finish to avoid suggesting that it closes any resources. OutFile::close still exists as an alias for finish.
close
finish
OutFile::close
This is a small thing I need for some of the unit tests I'm adding to #15.
In order to be backwards compatible,
OutFile
becomes a type alias for a new, more general type:close
was renamed tofinish
to avoid suggesting that it closes any resources.OutFile::close
still exists as an alias forfinish
.