Skip to content

Commit

Permalink
fix imports
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinheavey committed Dec 31, 2024
1 parent 35fb8e4 commit 324820b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion rpc-response/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ serde = { workspace = true }
serde_derive = { workspace = true }
solana-account-decoder-client-types = { workspace = true }
solana-clock = { workspace = true }
solana-fee-calculator = { workspace = true }
solana-fee-calculator = { workspace = true, features = ["serde"] }
solana-inflation = { workspace = true }
solana-transaction-error = { workspace = true }
solana-transaction-status-client-types = { workspace = true }
Expand Down
9 changes: 5 additions & 4 deletions rpc-response/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use {
serde::{Deserialize, Deserializer, Serialize, Serializer},
serde::{Deserializer, Serializer},
serde_derive::{Deserialize, Serialize},
solana_account_decoder_client_types::{token::UiTokenAmount, UiAccount},
solana_clock::{Epoch, Slot, UnixTimestamp},
solana_fee_calculator::{FeeCalculator, FeeRateGovernor},
Expand Down Expand Up @@ -56,7 +57,7 @@ impl Default for RpcApiVersion {
}
}

impl Serialize for RpcApiVersion {
impl serde::Serialize for RpcApiVersion {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: Serializer,
Expand All @@ -65,12 +66,12 @@ impl Serialize for RpcApiVersion {
}
}

impl<'de> Deserialize<'de> for RpcApiVersion {
impl<'de> serde::Deserialize<'de> for RpcApiVersion {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: Deserializer<'de>,
{
let s: String = Deserialize::deserialize(deserializer)?;
let s: String = serde::Deserialize::deserialize(deserializer)?;
Ok(RpcApiVersion(
semver::Version::from_str(&s).map_err(serde::de::Error::custom)?,
))
Expand Down

0 comments on commit 324820b

Please sign in to comment.