mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-05-02 02:00:03 +00:00
Take Receiver
by value in ReadableRx::new
It would remove the lifetime and make reasoning the code much easier. It would also unblock the next commit I am going to make. Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
b4e61161f2
commit
8ef1e56fcc
2 changed files with 10 additions and 10 deletions
|
@ -219,11 +219,11 @@ where
|
|||
|
||||
extract_impl(
|
||||
stream,
|
||||
Box::new(move |mut rx| {
|
||||
Box::new(move |rx| {
|
||||
fs::create_dir_all(path.parent().unwrap())?;
|
||||
|
||||
extract_compressed_from_readable::<DummyVisitor, _>(
|
||||
ReadableRx::new(&mut rx),
|
||||
ReadableRx::new(rx),
|
||||
fmt,
|
||||
Op::UnpackToPath(&path),
|
||||
)
|
||||
|
@ -242,8 +242,8 @@ where
|
|||
{
|
||||
extract_impl(
|
||||
stream,
|
||||
Box::new(move |mut rx| {
|
||||
extract_compressed_from_readable(ReadableRx::new(&mut rx), fmt, Op::Visit(&mut visitor))
|
||||
Box::new(move |rx| {
|
||||
extract_compressed_from_readable(ReadableRx::new(rx), fmt, Op::Visit(&mut visitor))
|
||||
.map(|_| visitor)
|
||||
}),
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue