Skip to content

Commit 7f38fda

Browse files
committed
rm unwraps
1 parent 0ee4be6 commit 7f38fda

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

src/framing.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ pub(crate) mod test {
331331
// NB this sluice pipe
332332
//
333333
for d in data {
334-
rightlp.feed(d.to_vec()).await.unwrap();
334+
rightlp.feed(d.to_vec()).await?;
335335
}
336336
let rflush = spawn(async move {
337337
rightlp.flush().await.unwrap();
@@ -340,14 +340,14 @@ pub(crate) mod test {
340340

341341
let mut result1 = vec![];
342342
for _ in data {
343-
result1.push(leftlp.next().await.unwrap().unwrap());
343+
result1.push(leftlp.next().await.unwrap()?);
344344
}
345345
let mut rightlp = rflush.await?;
346346

347347
assert_eq!(result1, data);
348348

349349
for d in data {
350-
leftlp.feed(d.to_vec()).await.unwrap();
350+
leftlp.feed(d.to_vec()).await?;
351351
}
352352
let lflush = spawn(async move {
353353
leftlp.flush().await.unwrap();
@@ -356,7 +356,7 @@ pub(crate) mod test {
356356

357357
let mut result2 = vec![];
358358
for _ in data {
359-
result2.push(rightlp.next().await.unwrap().unwrap());
359+
result2.push(rightlp.next().await.unwrap()?);
360360
}
361361
let mut leftlp = lflush.await?;
362362
assert_eq!(result2, data);
@@ -365,13 +365,13 @@ pub(crate) mod test {
365365
let mut r4 = vec![];
366366

367367
for d in data {
368-
rightlp.send(d.to_vec()).await.unwrap();
369-
leftlp.send(d.to_vec()).await.unwrap();
368+
rightlp.send(d.to_vec()).await?;
369+
leftlp.send(d.to_vec()).await?;
370370
}
371371

372372
for _ in data {
373-
r3.push(rightlp.next().await.unwrap().unwrap());
374-
r4.push(leftlp.next().await.unwrap().unwrap());
373+
r3.push(rightlp.next().await.unwrap()?);
374+
r4.push(leftlp.next().await.unwrap()?);
375375
}
376376

377377
assert_eq!(r3, data);

tests/basic.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ mod _util;
1111

1212
#[tokio::test]
1313
async fn basic_protocol() -> anyhow::Result<()> {
14-
_util::log();
1514
let (proto_a, proto_b) = create_pair_memory2().await?;
1615

1716
let next_a = next_event(proto_a);

tests/js_interop.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ async fn ncrs_client_writer() -> Result<()> {
9393
#[tokio::test]
9494
#[cfg_attr(not(feature = "js_interop_tests"), ignore)]
9595
async fn rcrs_server_writer() -> Result<()> {
96-
_util::log();
9796
rcrs(true, 8107).await?;
9897
Ok(())
9998
}

0 commit comments

Comments
 (0)