Skip to content

Commit b9e5b49

Browse files
committed
clippy fixes
1 parent 3235036 commit b9e5b49

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

src/framing.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use crate::util::{stat_uint24_le, wrap_uint24_le};
1616
const BUF_SIZE: usize = 1024 * 64;
1717
const _HEADER_LEN: usize = 3;
1818

19-
/// Turn a `AsyncWrite` of length prefixed messages and emit the messages with a Stream
19+
/// take a `AsyncWrite` of length prefixed messages and emit them as a Stream
2020
pub struct Uint24LELengthPrefixedFraming<IO> {
2121
io: IO,
2222
/// Data from [`Self::io`]'s [`AsyncRead`] interface to be sent out via the [`Stream`] interface.

src/test_utils.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ fn result_channel() -> (Sender<Vec<u8>>, impl Stream<Item = io::Result<Vec<u8>>>
188188
(tx, rx.map(Ok))
189189
}
190190

191+
#[allow(clippy::type_complexity)]
191192
pub(crate) fn create_result_connected() -> (
192193
Moo<impl Stream<Item = io::Result<Vec<u8>>>, impl Sink<Vec<u8>>>,
193194
Moo<impl Stream<Item = io::Result<Vec<u8>>>, impl Sink<Vec<u8>>>,

tests/js_interop.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,10 @@ async fn on_replication_message(
767767
for i in 0..new_info.contiguous_length {
768768
let value = String::from_utf8(hypercore.get(i).await?.unwrap()).unwrap();
769769
let line = format!("{} {}\n", i, value);
770-
writer.write(line.as_bytes()).await?;
770+
let n_written = writer.write(line.as_bytes()).await?;
771+
if line.len() != n_written {
772+
panic!("Couldn't write all write all bytse");
773+
}
771774
}
772775
writer.flush().await?;
773776
true

0 commit comments

Comments
 (0)