Skip to content

Commit

Permalink
Merge pull request #291 from ralexstokes/clone-api-type-group
Browse files Browse the repository at this point in the history
ensure `beacon-api-client` "type group" is Clone
  • Loading branch information
ralexstokes authored Oct 17, 2023
2 parents c122373 + 64bc0c5 commit 766aca6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion beacon-api-client/src/api_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ async fn api_error_or_value<T: serde::de::DeserializeOwned>(
}
}

pub trait ClientTypes {
pub trait ClientTypes: Clone {
type SignedContributionAndProof: serde::Serialize;
type SyncCommitteeContribution: serde::Serialize + serde::de::DeserializeOwned;
type BlindedBeaconBlock: serde::Serialize + serde::de::DeserializeOwned;
Expand Down
2 changes: 2 additions & 0 deletions beacon-api-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ pub mod presets {
},
};

#[derive(Clone)]
pub struct MainnetClientTypes;

impl crate::ClientTypes for MainnetClientTypes {
Expand Down Expand Up @@ -76,6 +77,7 @@ pub mod presets {
},
};

#[derive(Clone)]
pub struct MinimalClientTypes;

impl crate::ClientTypes for MinimalClientTypes {
Expand Down

0 comments on commit 766aca6

Please sign in to comment.