mirror of https://github.com/rwf2/Rocket.git
fixed clippy warning, as this expression creates a reference which is immediately dereferenced by the compiler
This commit is contained in:
parent
9fa19570a1
commit
9912105957
|
@ -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)?;
|
||||
|
|
|
@ -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")))?;
|
||||
|
||||
|
|
Loading…
Reference in New Issue