diff --git a/benches/read.rs b/benches/read.rs index 82e66a51..a60c86e0 100644 --- a/benches/read.rs +++ b/benches/read.rs @@ -51,7 +51,7 @@ fn benchmark(c: &mut Criterion) { for i in 0_u64..100_000 { writer .send(match i { - _ if i % 3 == 0 => Message::Binary(i.to_le_bytes().into()), + _ if i % 3 == 0 => Message::binary(i.to_le_bytes().to_vec()), _ => Message::Text(format!("{{\"id\":{i}}}")), }) .unwrap(); diff --git a/benches/write.rs b/benches/write.rs index 02bad6ac..435f9a3b 100644 --- a/benches/write.rs +++ b/benches/write.rs @@ -57,7 +57,7 @@ fn benchmark(c: &mut Criterion) { b.iter(|| { for i in 0_u64..100_000 { let msg = match i { - _ if i % 3 == 0 => Message::Binary(i.to_le_bytes().into()), + _ if i % 3 == 0 => Message::binary(i.to_le_bytes().to_vec()), _ => Message::Text(format!("{{\"id\":{i}}}")), }; ws.write(msg).unwrap();