Skip to content

Commit

Permalink
feat: serializing record enums with snake_case (#302)
Browse files Browse the repository at this point in the history
  • Loading branch information
holtgrewe committed Nov 20, 2023
1 parent 3449335 commit c9076fa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/freqs/cli/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ pub fn open_rocksdb_from_args(
}

/// Enumeration of possible result records.
#[derive(Debug, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
pub enum Record {
/// Record for autosomal variant.
Autosomal(freqs::serialized::auto::Record),
Expand Down
3 changes: 2 additions & 1 deletion src/gnomad_sv/cli/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ pub fn open_rocksdb_from_args(
}

/// Enumeration for the different record types that we have.
#[derive(Debug)]
#[derive(Debug, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
pub enum Record {
/// ExAC SV record.
ExacCnv(crate::gnomad_pbs::exac_cnv::Record),
Expand Down

0 comments on commit c9076fa

Please sign in to comment.