Skip to content

Commit 193e2c1

Browse files
committed
Fixed warning
1 parent e911bd1 commit 193e2c1

File tree

1 file changed

+1
-22
lines changed

1 file changed

+1
-22
lines changed

core/src/tcp/util.rs

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
//! Utility module for TCP client or server.
3030
3131
use bp3d_debug::warning;
32-
use std::fmt::{Debug, Display, Formatter};
32+
use std::fmt::{Debug, Formatter};
3333
use std::io::{Error, ErrorKind, IoSlice};
3434
use std::net::SocketAddr;
3535
use std::pin::Pin;
@@ -50,27 +50,6 @@ pub(super) struct DataMsg {
5050

5151
unsafe impl Send for DataMsg {}
5252

53-
/// An error type that can be thrown when sending or broadcasting to network clients.
54-
#[derive(Debug)]
55-
pub enum SendError {
56-
/// The application was requested to exit.
57-
IsExiting,
58-
59-
/// The broadcast channel is already closed.
60-
Closed,
61-
}
62-
63-
impl Display for SendError {
64-
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
65-
match self {
66-
SendError::IsExiting => f.write_str("exit requested"),
67-
SendError::Closed => f.write_str("channel closed"),
68-
}
69-
}
70-
}
71-
72-
impl std::error::Error for SendError {}
73-
7453
/// The event returned by the ready function in [Network].
7554
pub enum ReadyEvent {
7655
/// The connection was lost, this indicates to break out of the event loop.

0 commit comments

Comments
 (0)