Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
maciejka committed Jun 14, 2024
1 parent 011fbbd commit fb4424f
Show file tree
Hide file tree
Showing 5 changed files with 150 additions and 81 deletions.
2 changes: 1 addition & 1 deletion crates/starknet-types-rpc/src/custom/block_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ enum BlockIdHelper<F> {
Number(BlockNumberHelper),
}

impl <F: Copy + Serialize> serde::Serialize for BlockId<F> {
impl<F: Copy + Serialize> serde::Serialize for BlockId<F> {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: serde::Serializer,
Expand Down
8 changes: 5 additions & 3 deletions crates/starknet-types-rpc/src/custom/syncing_status.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::marker::PhantomData;
use serde::de::Visitor;
use serde::{Deserialize, Deserializer, Serialize, Serializer};
use std::marker::PhantomData;

use crate::SyncStatus;

Expand All @@ -13,7 +13,7 @@ pub enum SyncingStatus<F> {
Syncing(SyncStatus<F>),
}

impl <F: Serialize> Serialize for SyncingStatus<F> {
impl<F: Serialize> Serialize for SyncingStatus<F> {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: Serializer,
Expand Down Expand Up @@ -63,7 +63,9 @@ impl<'de, F: Deserialize<'de>> Deserialize<'de> for SyncingStatus<F> {
}
}

deserializer.deserialize_any(SyncingStatusVisitor::<F> { marker: PhantomData })
deserializer.deserialize_any(SyncingStatusVisitor::<F> {
marker: PhantomData,
})
}
}

Expand Down
Loading

0 comments on commit fb4424f

Please sign in to comment.