Skip to content

Commit 10ec257

Browse files
authored
Use derive(Default) for HiveFormat (apache#348)
Signed-off-by: koushiro <[email protected]>
1 parent d2d4fc0 commit 10ec257

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

src/ast/mod.rs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1559,24 +1559,14 @@ pub enum HiveIOFormat {
15591559
},
15601560
}
15611561

1562-
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1562+
#[derive(Debug, Clone, PartialEq, Eq, Hash, Default)]
15631563
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15641564
pub struct HiveFormat {
15651565
pub row_format: Option<HiveRowFormat>,
15661566
pub storage: Option<HiveIOFormat>,
15671567
pub location: Option<String>,
15681568
}
15691569

1570-
impl Default for HiveFormat {
1571-
fn default() -> Self {
1572-
HiveFormat {
1573-
row_format: None,
1574-
location: None,
1575-
storage: None,
1576-
}
1577-
}
1578-
}
1579-
15801570
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
15811571
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15821572
pub struct SqlOption {

0 commit comments

Comments
 (0)