Skip to content

Commit 5d06842

Browse files
fixup
1 parent 4f32779 commit 5d06842

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

Cargo.lock

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

iroh-bytes/src/store/traits.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use bao_tree::{
66
BaoTree, ByteNum, ChunkRanges,
77
};
88
use bytes::Bytes;
9-
use futures_lite::Stream;
9+
use futures_lite::{Stream, StreamExt};
1010
use genawaiter::rc::{Co, Gen};
1111
use iroh_base::rpc::RpcError;
1212
use iroh_io::{AsyncSliceReader, AsyncSliceWriter};
@@ -467,7 +467,7 @@ async fn validate_impl(
467467
total: complete.len() as u64,
468468
})
469469
.await?;
470-
let complete_result = futures::stream::iter(complete)
470+
let complete_result = futures_lite::stream::iter(complete)
471471
.map(|hash| {
472472
let store = store.clone();
473473
let tx = tx.clone();
@@ -516,7 +516,7 @@ async fn validate_impl(
516516
.buffered_unordered(validate_parallelism)
517517
.collect::<Vec<_>>()
518518
.await;
519-
let partial_result = futures::stream::iter(partial)
519+
let partial_result = futures_lite::stream::iter(partial)
520520
.map(|hash| {
521521
let store = store.clone();
522522
let tx = tx.clone();

iroh-bytes/src/util/progress.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,13 +146,15 @@ impl<T> std::fmt::Debug for BoxedProgressSender<T> {
146146
}
147147
}
148148

149+
type BoxFuture<'a, T> = std::pin::Pin<Box<dyn Future<Output = T> + Send + 'a>>;
150+
149151
/// Boxable progress sender
150152
trait BoxableProgressSender<T>: IdGenerator + std::fmt::Debug + Send + Sync + 'static {
151153
/// Send a message and wait if the receiver is full.
152154
///
153155
/// Use this to send important progress messages where delivery must be guaranteed.
154156
#[must_use]
155-
fn send(&self, msg: T) -> BoxFuture<ProgressSendResult<()>>;
157+
fn send(&self, msg: T) -> BoxFuture<'_, ProgressSendResult<()>>;
156158

157159
/// Try to send a message and drop it if the receiver is full.
158160
///
@@ -168,8 +170,8 @@ trait BoxableProgressSender<T>: IdGenerator + std::fmt::Debug + Send + Sync + 's
168170
impl<I: ProgressSender + IdGenerator> BoxableProgressSender<I::Msg>
169171
for BoxableProgressSenderWrapper<I>
170172
{
171-
fn send(&self, msg: I::Msg) -> BoxFuture<ProgressSendResult<()>> {
172-
self.0.send(msg).boxed()
173+
fn send(&self, msg: I::Msg) -> BoxFuture<'_, ProgressSendResult<()>> {
174+
Box::pin(self.0.send(msg))
173175
}
174176

175177
fn try_send(&self, msg: I::Msg) -> ProgressSendResult<()> {

0 commit comments

Comments
 (0)