Skip to content

Commit ebfcbd2

Browse files
sheshnath-at-knoldusthe10thWiz
authored andcommitted
fixed clippy warnings
1 parent fd75d0c commit ebfcbd2

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

core/codegen/src/attribute/route/mod.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,12 @@ fn internal_uri_macro_decl(route: &Route) -> TokenStream {
266266
route.attr.method.as_ref().map(|m| m.0.hash(&mut hasher));
267267
route.attr.uri.path().hash(&mut hasher);
268268
route.attr.uri.query().hash(&mut hasher);
269-
route.attr.data.as_ref().map(|d| d.value.hash(&mut hasher));
270-
route.attr.format.as_ref().map(|f| f.0.hash(&mut hasher));
269+
if let Some(data) = &route.attr.data {
270+
data.value.hash(&mut hasher);
271+
}
272+
if let Some(format) = &route.attr.format {
273+
format.0.hash(&mut hasher);
274+
}
271275
});
272276

273277
let route_uri = route.attr.uri.to_string();

core/lib/src/listener/tcp.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ impl Bind for TcpListener {
2424
type Error = Either<figment::Error, io::Error>;
2525

2626
async fn bind(rocket: &Rocket<Ignite>) -> Result<Self, Self::Error> {
27-
let endpoint = Self::bind_endpoint(&rocket)?;
27+
let endpoint = Self::bind_endpoint(rocket)?;
2828
let addr = endpoint.tcp()
2929
.ok_or_else(|| io::Error::other("internal error: invalid endpoint"))
3030
.map_err(Right)?;

core/lib/src/listener/unix.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ impl Bind for UnixListener {
7575
type Error = Either<figment::Error, io::Error>;
7676

7777
async fn bind(rocket: &Rocket<Ignite>) -> Result<Self, Self::Error> {
78-
let endpoint = Self::bind_endpoint(&rocket)?;
78+
let endpoint = Self::bind_endpoint(rocket)?;
7979
let path = endpoint.unix()
8080
.ok_or_else(|| Right(io::Error::other("internal error: invalid endpoint")))?;
8181

0 commit comments

Comments
 (0)