mirror of https://github.com/rwf2/Rocket.git
fixed clippy warnings
This commit is contained in:
parent
fd75d0ccca
commit
ebfcbd2c75
|
@ -266,8 +266,12 @@ fn internal_uri_macro_decl(route: &Route) -> TokenStream {
|
|||
route.attr.method.as_ref().map(|m| m.0.hash(&mut hasher));
|
||||
route.attr.uri.path().hash(&mut hasher);
|
||||
route.attr.uri.query().hash(&mut hasher);
|
||||
route.attr.data.as_ref().map(|d| d.value.hash(&mut hasher));
|
||||
route.attr.format.as_ref().map(|f| f.0.hash(&mut hasher));
|
||||
if let Some(data) = &route.attr.data {
|
||||
data.value.hash(&mut hasher);
|
||||
}
|
||||
if let Some(format) = &route.attr.format {
|
||||
format.0.hash(&mut hasher);
|
||||
}
|
||||
});
|
||||
|
||||
let route_uri = route.attr.uri.to_string();
|
||||
|
|
|
@ -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