Use and create into_inner() instead of unwrap()
This commit is contained in:
parent
bdda4310e4
commit
271ebab7a8
2 changed files with 9 additions and 2 deletions
|
@ -141,8 +141,15 @@ impl<T: Reader+Seek> ZipReader<T>
|
|||
/// Unwrap and return the inner reader object
|
||||
///
|
||||
/// The position of the reader is undefined.
|
||||
pub fn into_inner(self) -> T
|
||||
{
|
||||
self.inner.into_inner()
|
||||
}
|
||||
|
||||
/// Deprecated method equal to `into_inner()`
|
||||
#[deprecated="renamed to into_inner()"]
|
||||
pub fn unwrap(self) -> T
|
||||
{
|
||||
self.inner.unwrap()
|
||||
self.into_inner()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -66,5 +66,5 @@ fn build_extra_field(_file: &ZipFile) -> ZipResult<Vec<u8>>
|
|||
{
|
||||
let writer = io::MemWriter::new();
|
||||
// Future work
|
||||
Ok(writer.unwrap())
|
||||
Ok(writer.into_inner())
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue