Skip to content

Commit

Permalink
fix: simpler defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
roeap committed May 7, 2023
1 parent 6137185 commit 56eb129
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions rust/src/data_catalog/unity/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,12 @@ pub struct Schema {
pub metastore_id: String,
}

#[derive(Deserialize)]
#[derive(Deserialize, Default)]
#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
#[allow(missing_docs)]
/// Possible data source formats for unity tables
pub enum DataSourceFormat {
#[default]
Undefined,
Delta,
Csv,
Expand All @@ -124,17 +125,12 @@ pub enum DataSourceFormat {
Deltasharing,
}

impl Default for DataSourceFormat {
fn default() -> Self {
DataSourceFormat::Undefined
}
}

#[derive(Deserialize)]
#[derive(Deserialize, Default)]
#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
#[allow(missing_docs)]
/// Possible data source formats for unity tables
pub enum TableType {
#[default]
Undefined,
Managed,
External,
Expand All @@ -143,12 +139,6 @@ pub enum TableType {
StreamingTable,
}

impl Default for TableType {
fn default() -> Self {
TableType::Undefined
}
}

///
#[derive(Deserialize)]
pub struct TableSummary {
Expand Down

0 comments on commit 56eb129

Please sign in to comment.