From c23ec0e8f80ab8574ae16beff9a4fe844cdfebf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20H=C3=A4ggblad?= Date: Fri, 21 Oct 2022 22:11:52 +0200 Subject: [PATCH] rustfmt --- clients/client-core/src/client/cover_traffic_stream.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/clients/client-core/src/client/cover_traffic_stream.rs b/clients/client-core/src/client/cover_traffic_stream.rs index 7da6710907..9619680db8 100644 --- a/clients/client-core/src/client/cover_traffic_stream.rs +++ b/clients/client-core/src/client/cover_traffic_stream.rs @@ -13,10 +13,10 @@ use nymsphinx::cover::generate_loop_cover_packet; use nymsphinx::params::PacketSize; use nymsphinx::utils::sample_poisson_duration; use rand::{rngs::OsRng, CryptoRng, Rng}; -use tokio::sync::mpsc::error::TrySendError; use std::pin::Pin; use std::sync::Arc; use std::time::Duration; +use tokio::sync::mpsc::error::TrySendError; #[cfg(not(target_arch = "wasm32"))] use tokio::time; @@ -176,14 +176,14 @@ impl LoopCoverTrafficStream { // - we run out of memory // - the receiver channel is closed // in either case there's no recovery and we can only panic - if let Err(err) = self.mix_tx.try_send(vec![cover_message]) { + if let Err(err) = self.mix_tx.try_send(vec![cover_message]) { match err { TrySendError::Full(_) => { log::warn!("Failed to send cover message - channel full"); - }, + } TrySendError::Closed(_) => { log::warn!("Failed to send cover message - channel closed"); - }, + } } }