mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-24 06:41:06 +00:00
chore: fix some minor issues in the comments (#2106)
Signed-off-by: withtimezone <with_timezone@outlook.com>
This commit is contained in:
@@ -60,7 +60,7 @@ impl<'atblock> AnyStorageInfo<'atblock> {
|
|||||||
Ok(info)
|
Ok(info)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Is the storage entry a map (ie something we'd provide extra keys to to access a value, or otherwise iterate over)?
|
/// Is the storage entry a map (ie something we'd provide extra keys to access a value, or otherwise iterate over)?
|
||||||
pub fn is_map(&self) -> bool {
|
pub fn is_map(&self) -> bool {
|
||||||
match self {
|
match self {
|
||||||
AnyStorageInfo::Legacy(info) => !info.info.keys.is_empty(),
|
AnyStorageInfo::Legacy(info) => !info.info.keys.is_empty(),
|
||||||
|
|||||||
@@ -255,7 +255,7 @@ pub struct Json<T>(pub T);
|
|||||||
|
|
||||||
impl Json<serde_json::Value> {
|
impl Json<serde_json::Value> {
|
||||||
/// Create a [`Json<serde_json::Value>`] from some serializable value.
|
/// Create a [`Json<serde_json::Value>`] from some serializable value.
|
||||||
/// Useful when value types are heterogenous.
|
/// Useful when value types are heterogeneous.
|
||||||
pub fn value_of<T: serde::Serialize>(item: T) -> Self {
|
pub fn value_of<T: serde::Serialize>(item: T) -> Self {
|
||||||
Json(serde_json::to_value(item).expect("item cannot be converted to a serde_json::Value"))
|
Json(serde_json::to_value(item).expect("item cannot be converted to a serde_json::Value"))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ async fn fetch_finalized_blocks<T: Config>(
|
|||||||
.subscribe_finalized()
|
.subscribe_finalized()
|
||||||
.await
|
.await
|
||||||
.expect("issue subscribing to finalized in fetch_finalized_blocks")
|
.expect("issue subscribing to finalized in fetch_finalized_blocks")
|
||||||
.skip(1) // <- skip first block incase next is close to being ready already.
|
.skip(1) // <- skip first block in case next is close to being ready already.
|
||||||
.take(n)
|
.take(n)
|
||||||
.map(|r| r.expect("issue fetching block in fetch_finalized_blocks"))
|
.map(|r| r.expect("issue fetching block in fetch_finalized_blocks"))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user