mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-21 13:08:42 +00:00
Impl forward of &mut T
to T
for TarEntriesVisitor
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
90a96cabc9
commit
4892d8bf3a
1 changed files with 6 additions and 0 deletions
|
@ -15,6 +15,12 @@ pub trait TarEntriesVisitor {
|
||||||
fn visit<R: Read>(&mut self, entries: Entries<'_, R>) -> Result<(), BinstallError>;
|
fn visit<R: Read>(&mut self, entries: Entries<'_, R>) -> Result<(), BinstallError>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<V: TarEntriesVisitor> TarEntriesVisitor for &mut V {
|
||||||
|
fn visit<R: Read>(&mut self, entries: Entries<'_, R>) -> Result<(), BinstallError> {
|
||||||
|
(*self).visit(entries)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// * `f` - If Some, then this function will pass
|
/// * `f` - If Some, then this function will pass
|
||||||
/// the entries of the `dat` to it and let it decides
|
/// the entries of the `dat` to it and let it decides
|
||||||
/// what to do with the tar.
|
/// what to do with the tar.
|
||||||
|
|
Loading…
Add table
Reference in a new issue