Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions crates/iceberg/src/spec/manifest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1107,14 +1107,13 @@ impl FromStr for DataFileFormat {
}
}

impl ToString for DataFileFormat {
fn to_string(&self) -> String {
impl std::fmt::Display for DataFileFormat {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
DataFileFormat::Avro => "avro",
DataFileFormat::Orc => "orc",
DataFileFormat::Parquet => "parquet",
DataFileFormat::Avro => write!(f, "avro"),
DataFileFormat::Orc => write!(f, "orc"),
DataFileFormat::Parquet => write!(f, "parquet"),
}
.to_string()
}
}

Expand Down
8 changes: 4 additions & 4 deletions crates/iceberg/src/spec/manifest_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -603,11 +603,11 @@ impl FromStr for ManifestContentType {
}
}

impl ToString for ManifestContentType {
fn to_string(&self) -> String {
impl std::fmt::Display for ManifestContentType {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
ManifestContentType::Data => "data".to_string(),
ManifestContentType::Deletes => "deletes".to_string(),
ManifestContentType::Data => write!(f, "data"),
ManifestContentType::Deletes => write!(f, "deletes"),
}
}
}
Expand Down