Skip to content

Commit

Permalink
Make clippy happy
Browse files Browse the repository at this point in the history
Signed-off-by: Jens Reidel <[email protected]>
  • Loading branch information
Gelbpunkt committed Jan 30, 2024
1 parent a815517 commit 02bf915
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ static GLOBAL: MiMalloc = MiMalloc;

static SHUTDOWN: AtomicBool = AtomicBool::new(false);

#[allow(clippy::cognitive_complexity, clippy::too_many_lines)]
#[allow(
clippy::cognitive_complexity,
clippy::too_many_lines,
clippy::redundant_pub_crate
)]
async fn run() -> Result<(), Box<dyn Error + Send + Sync>> {
let level_filter = LevelFilter::from_str(&CONFIG.log_level).unwrap_or(LevelFilter::INFO);
let (reload_level_filter, reload_handle) = reload::Layer::new(level_filter);
Expand Down
4 changes: 2 additions & 2 deletions src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ where
if use_zlib {
compress_full(&mut compress, &mut compression_buffer, HELLO.as_bytes());

sink.send(Message::binary(Bytes::from(compression_buffer.to_vec())))
sink.send(Message::binary(Bytes::from(compression_buffer.clone())))
.await?;
} else {
sink.send(Message::text(HELLO.to_string())).await?;
Expand All @@ -104,7 +104,7 @@ where
compression_buffer.clear();
compress_full(&mut compress, &mut compression_buffer, &msg.into_payload());

sink.send(Message::binary(Bytes::from(compression_buffer.to_vec())))
sink.send(Message::binary(Bytes::from(compression_buffer.clone())))
.await?;
} else {
sink.send(msg).await?;
Expand Down

0 comments on commit 02bf915

Please sign in to comment.