Skip to content

Commit

Permalink
chore: delete wrong comment and refactor set_metadata in Field (#3630)
Browse files Browse the repository at this point in the history
  • Loading branch information
chunshao90 authored Jan 30, 2023
1 parent 266e2cf commit 3c8d8db
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions arrow-schema/src/field.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,9 @@ impl Field {
}

/// Sets the `Field`'s optional custom metadata.
/// The metadata is set as `None` for empty map.
#[inline]
pub fn set_metadata(&mut self, metadata: HashMap<String, String>) {
self.metadata = HashMap::default();
if !metadata.is_empty() {
self.metadata = metadata;
}
self.metadata = metadata;
}

/// Sets the metadata of this `Field` to be `metadata` and returns self
Expand Down

0 comments on commit 3c8d8db

Please sign in to comment.