From a25b928f296ee0dda7c89bc16a61b0acdbc8ffa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Pol=C3=A1=C4=8Dek?= Date: Thu, 10 Oct 2024 07:58:50 +0200 Subject: [PATCH] fix: formatting errors from #19 --- src/connections/handlers.rs | 6 ++---- src/errors_internal.rs | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/connections/handlers.rs b/src/connections/handlers.rs index 0d427f8..611d3cd 100644 --- a/src/connections/handlers.rs +++ b/src/connections/handlers.rs @@ -59,10 +59,8 @@ where match read_stream.read(&mut buffer).await { Ok(0) => { warn!("read_stream has reached EOF"); - return Err(Error::InternalStreamError( - InternalStreamError::Eof - )) - }, + return Err(Error::InternalStreamError(InternalStreamError::Eof)); + } Ok(n) => { trace!("Read {} bytes from stream", n); let data: IncomingStreamData = buffer[..n].to_vec().into(); diff --git a/src/errors_internal.rs b/src/errors_internal.rs index 35d7705..2e76221 100644 --- a/src/errors_internal.rs +++ b/src/errors_internal.rs @@ -70,7 +70,7 @@ pub enum InternalStreamError { /// An error indicating the stream has reached its "end of file" and will likely no longer be able to produce bytes. #[error("Stream has reached EOF")] - Eof + Eof, } /// An enum that defines the possible internal errors that can occur within the library when handling data channels.