Skip to content

Commit

Permalink
lint: clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
prestwich committed Sep 24, 2024
1 parent edba0a5 commit 4e8641e
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions crates/json-rpc/src/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,11 +266,7 @@ where
if params.is_none() {
if std::mem::size_of::<Params>() == 0 {
// SAFETY: params is a ZST, so it's safe to fail to initialize it
unsafe {
params = Some(std::mem::transmute(
MaybeUninit::<Params>::uninit().assume_init(),
))
}
unsafe { params = Some(MaybeUninit::<Params>::zeroed().assume_init()) }
} else {
return Err(serde::de::Error::missing_field("params"));
}
Expand Down

0 comments on commit 4e8641e

Please sign in to comment.