Skip to content

Commit bfc1dc8

Browse files
committed
feat: v5.0.3
1 parent bfde0a2 commit bfc1dc8

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "tcplane"
3-
version = "5.0.2"
3+
version = "5.0.3"
44
readme = "README.md"
55
edition = "2024"
66
authors = ["root@ltpp.vip"]

src/handler/fn.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
///
99
/// - `()` - This function does not return any meaningful value.
1010
pub(crate) fn print_error_handle(error: String) {
11-
eprintln!("{}", error);
11+
eprintln!("{error}");
1212
let _ = std::io::Write::flush(&mut std::io::stderr());
1313
}

src/response/error/impl.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ impl StdError for ResponseError {}
55
impl Display for ResponseError {
66
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
77
match self {
8-
Self::ResponseError(data) => write!(f, "Response Error{}{}", COLON_SPACE, data),
9-
Self::CloseError(data) => write!(f, "Close Error{}{}", COLON_SPACE, data),
8+
Self::ResponseError(data) => write!(f, "Response Error{COLON_SPACE}{data}"),
9+
Self::CloseError(data) => write!(f, "Close Error{COLON_SPACE}{data}"),
1010
Self::NotFoundStream => {
1111
write!(f, "Not found stream")
1212
}

src/server/error/impl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ impl StdError for ServerError {}
55
impl Display for ServerError {
66
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
77
match self {
8-
Self::TcpBindError(data) => write!(f, "Tcp bind error{}{}", COLON_SPACE, data),
8+
Self::TcpBindError(data) => write!(f, "Tcp bind error{COLON_SPACE}{data}"),
99
Self::Unknown => write!(f, "Unknown"),
1010
}
1111
}

src/server/impl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ impl Server {
149149
let config: ServerConfig = self.config.read().await.clone();
150150
let host: String = config.host.to_owned();
151151
let port: usize = config.port;
152-
let addr: String = format!("{}{}{}", host, COLON_SPACE_SYMBOL, port);
152+
let addr: String = format!("{host}{COLON_SPACE_SYMBOL}{port}");
153153
let tcp_listener: TcpListener = TcpListener::bind(&addr)
154154
.await
155155
.map_err(|e| ServerError::TcpBindError(e.to_string()))

0 commit comments

Comments
 (0)