mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-15 22:01:04 +00:00
Allow batch query for block hash. (#4210)
This commit is contained in:
committed by
Gavin Wood
parent
70bc6eaed6
commit
cfb590ac4b
@@ -19,3 +19,20 @@
|
||||
#![warn(missing_docs)]
|
||||
|
||||
pub mod number;
|
||||
pub mod list;
|
||||
|
||||
/// A util function to assert the result of serialization and deserialization is the same.
|
||||
#[cfg(test)]
|
||||
pub(crate) fn assert_deser<T>(s: &str, expected: T) where
|
||||
T: std::fmt::Debug + serde::ser::Serialize + serde::de::DeserializeOwned + PartialEq
|
||||
{
|
||||
assert_eq!(
|
||||
serde_json::from_str::<T>(s).unwrap(),
|
||||
expected
|
||||
);
|
||||
assert_eq!(
|
||||
serde_json::to_string(&expected).unwrap(),
|
||||
s
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user