Skip to content

Commit

Permalink
fix: serde compilation intricacies
Browse files Browse the repository at this point in the history
  • Loading branch information
de-sh committed Dec 7, 2024
1 parent c9da598 commit 6372269
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -591,11 +591,11 @@ impl FromArgMatches for Cli {
.get_one::<usize>(Self::ROW_GROUP_SIZE)
.cloned()
.expect("default for row_group size");
self.parquet_compression = serde_json::from_str(
self.parquet_compression = serde_json::from_str(&format!(
"{:?}",
m.get_one::<String>(Self::PARQUET_COMPRESSION_ALGO)
.expect("default for compression algo")
.as_str(),
)
))
.expect("unexpected compression algo");

let openid_client_id = m.get_one::<String>(Self::OPENID_CLIENT_ID).cloned();
Expand Down
2 changes: 1 addition & 1 deletion src/handlers/http/kinesis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use std::collections::BTreeMap;
use std::str;

#[derive(Serialize, Deserialize, Debug)]
#[serde(rename = "camelCase")]
#[serde(rename_all = "camelCase")]
struct Message {
records: Vec<Data>,
request_id: String,
Expand Down
2 changes: 1 addition & 1 deletion src/handlers/http/middleware.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ use crate::{
use serde::{Deserialize, Serialize};

#[derive(Serialize, Deserialize, Debug)]
#[serde(rename = "camelCase")]
#[serde(rename_all = "camelCase")]
struct Message {
common_attributes: CommonAttributes,
}
Expand Down
2 changes: 1 addition & 1 deletion src/option.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ pub enum Mode {
}

#[derive(Debug, Clone, Copy, PartialEq, Eq, Default, Deserialize)]
#[serde(rename = "lowercase")]
#[serde(rename_all = "lowercase")]
pub enum Compression {
Uncompressed,
Snappy,
Expand Down

0 comments on commit 6372269

Please sign in to comment.