fixed clippy warning, as this expression creates a reference which is immediately dereferenced by the compiler

This commit is contained in:
sheshnath-at-knoldus 2024-08-02 13:31:43 +05:30
parent 9fa19570a1
commit 9912105957
2 changed files with 2 additions and 2 deletions

View File

@ -24,7 +24,7 @@ impl Bind for TcpListener {
type Error = Either<figment::Error, io::Error>;
async fn bind(rocket: &Rocket<Ignite>) -> Result<Self, Self::Error> {
let endpoint = Self::bind_endpoint(&rocket)?;
let endpoint = Self::bind_endpoint(rocket)?;
let addr = endpoint.tcp()
.ok_or_else(|| io::Error::other("internal error: invalid endpoint"))
.map_err(Right)?;

View File

@ -75,7 +75,7 @@ impl Bind for UnixListener {
type Error = Either<figment::Error, io::Error>;
async fn bind(rocket: &Rocket<Ignite>) -> Result<Self, Self::Error> {
let endpoint = Self::bind_endpoint(&rocket)?;
let endpoint = Self::bind_endpoint(rocket)?;
let path = endpoint.unix()
.ok_or_else(|| Right(io::Error::other("internal error: invalid endpoint")))?;