Skip to content

Commit d62c9b8

Browse files
committed
1 parent bde8795 commit d62c9b8

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/main.rs

+8-6
Original file line numberDiff line numberDiff line change
@@ -75,18 +75,20 @@ impl<'de> Deserialize<'de> for Rpc {
7575
}
7676
}
7777

78+
// FIXME: Workaround for rust-lang/rust#55779. Move back to the impl when fixed.
79+
#[derive(Deserialize)]
80+
#[allow(unused)]
81+
struct InnerRpc {
82+
method: String,
83+
params: Vec<String>,
84+
}
85+
7886
#[cfg(feature = "json-rpc")]
7987
impl<'de> Deserialize<'de> for Rpc {
8088
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
8189
where
8290
D: serde::Deserializer<'de>,
8391
{
84-
#[derive(Deserialize)]
85-
struct InnerRpc {
86-
method: String,
87-
params: Vec<String>,
88-
}
89-
9092
let (id, rpc): (u64, InnerRpc) = Deserialize::deserialize(deserializer)?;
9193

9294
Ok(Rpc {

0 commit comments

Comments
 (0)