Skip to content

Commit 3c8d8db

Browse files
authored
chore: delete wrong comment and refactor set_metadata in Field (#3630)
1 parent 266e2cf commit 3c8d8db

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

arrow-schema/src/field.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,9 @@ impl Field {
142142
}
143143

144144
/// Sets the `Field`'s optional custom metadata.
145-
/// The metadata is set as `None` for empty map.
146145
#[inline]
147146
pub fn set_metadata(&mut self, metadata: HashMap<String, String>) {
148-
self.metadata = HashMap::default();
149-
if !metadata.is_empty() {
150-
self.metadata = metadata;
151-
}
147+
self.metadata = metadata;
152148
}
153149

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

0 commit comments

Comments
 (0)