fix: derive default rather than implement it
@@ -215,7 +215,7 @@ impl FileStatsBuilder {
}
}
/// Represents statistics for a set of files
-#[derive(Debug, PartialEq, Eq)]
+#[derive(Debug, PartialEq, Eq, Default)]
pub struct FileSetStats {
/// total size of input file, in bytes
pub total_len: u64,
@@ -241,7 +241,7 @@ impl fmt::Display for FileSetStats {
)
}
}
-#[derive(Debug, PartialEq, Eq)]
+#[derive(Debug, PartialEq, Eq, Default)]
pub struct FileSetStatsBuilder {
inner: FileSetStats,
@@ -250,20 +250,6 @@ pub struct FileSetStatsBuilder {
col_stats_map: BTreeMap<String, usize>,
}
-impl Default for FileSetStatsBuilder {
- fn default() -> Self {
- Self {
- inner: FileSetStats {
- total_len: 0,
- total_rows: 0,
- max_columns: 0,
- col_stats: Vec::new(),
- },
- col_stats_map: BTreeMap::new(),
- }
- }
-}
-
impl FileSetStatsBuilder {
/// Add a file's statstics
pub fn accumulate(mut self, file_stats: &FileStats) -> Self {
