Future-aware enum name
This commit is contained in:
parent
60ed8e2892
commit
3977ed5c82
|
@ -178,16 +178,16 @@ impl EncodingConfig for RpcConfirmedTransactionConfig {
|
|||
|
||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum RpcConfirmedBlocksConfig {
|
||||
pub enum RpcConfirmedBlocksConfigWrapper {
|
||||
EndSlotOnly(Option<Slot>),
|
||||
CommitmentOnly(Option<CommitmentConfig>),
|
||||
}
|
||||
|
||||
impl RpcConfirmedBlocksConfig {
|
||||
impl RpcConfirmedBlocksConfigWrapper {
|
||||
pub fn unzip(&self) -> (Option<Slot>, Option<CommitmentConfig>) {
|
||||
match &self {
|
||||
RpcConfirmedBlocksConfig::EndSlotOnly(end_slot) => (*end_slot, None),
|
||||
RpcConfirmedBlocksConfig::CommitmentOnly(commitment) => (None, *commitment),
|
||||
RpcConfirmedBlocksConfigWrapper::EndSlotOnly(end_slot) => (*end_slot, None),
|
||||
RpcConfirmedBlocksConfigWrapper::CommitmentOnly(commitment) => (None, *commitment),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2318,7 +2318,7 @@ pub mod rpc_full {
|
|||
&self,
|
||||
meta: Self::Metadata,
|
||||
start_slot: Slot,
|
||||
config: Option<RpcConfirmedBlocksConfig>,
|
||||
config: Option<RpcConfirmedBlocksConfigWrapper>,
|
||||
commitment: Option<CommitmentConfig>,
|
||||
) -> Result<Vec<Slot>>;
|
||||
|
||||
|
@ -2976,7 +2976,7 @@ pub mod rpc_full {
|
|||
&self,
|
||||
meta: Self::Metadata,
|
||||
start_slot: Slot,
|
||||
config: Option<RpcConfirmedBlocksConfig>,
|
||||
config: Option<RpcConfirmedBlocksConfigWrapper>,
|
||||
commitment: Option<CommitmentConfig>,
|
||||
) -> Result<Vec<Slot>> {
|
||||
let (end_slot, maybe_commitment) =
|
||||
|
|
Loading…
Reference in New Issue