Skip to content

Commit

Permalink
fixed clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
sheshnath-at-knoldus authored and the10thWiz committed Nov 17, 2024
1 parent fd75d0c commit ebfcbd2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions core/codegen/src/attribute/route/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion core/lib/src/listener/tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)?;
Expand Down
2 changes: 1 addition & 1 deletion core/lib/src/listener/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")))?;

Expand Down

0 comments on commit ebfcbd2

Please sign in to comment.