mirror of
https://github.com/lune-org/lune.git
synced 2024-12-12 13:00:37 +00:00
Make clippy happy
This commit is contained in:
parent
d7c603e881
commit
ef9550ced5
1 changed files with 1 additions and 8 deletions
|
@ -21,14 +21,7 @@ use super::{
|
||||||
};
|
};
|
||||||
|
|
||||||
pub(super) fn bind_to_localhost(port: u16) -> LuaResult<Builder<AddrIncoming>> {
|
pub(super) fn bind_to_localhost(port: u16) -> LuaResult<Builder<AddrIncoming>> {
|
||||||
let addr = match SocketAddr::try_from(([127, 0, 0, 1], port)) {
|
let addr = SocketAddr::from(([127, 0, 0, 1], port));
|
||||||
Ok(a) => a,
|
|
||||||
Err(e) => {
|
|
||||||
return Err(LuaError::external(format!(
|
|
||||||
"Failed to bind to localhost on port {port}\n{e}"
|
|
||||||
)))
|
|
||||||
}
|
|
||||||
};
|
|
||||||
match Server::try_bind(&addr) {
|
match Server::try_bind(&addr) {
|
||||||
Ok(b) => Ok(b),
|
Ok(b) => Ok(b),
|
||||||
Err(e) => Err(LuaError::external(format!(
|
Err(e) => Err(LuaError::external(format!(
|
||||||
|
|
Loading…
Reference in a new issue