Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

inline push #835

Merged
merged 1 commit into from
Feb 14, 2022
Merged
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
3 changes: 3 additions & 0 deletions src/array/utf8/mutable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ impl<O: Offset> MutableUtf8Array<O> {
/// Pushes a new element to the array.
/// # Panic
/// This operation panics iff the length of all values (in bytes) exceeds `O` maximum value.
#[inline]
pub fn push<T: AsRef<str>>(&mut self, value: Option<T>) {
self.try_push(value).unwrap()
}
Expand Down Expand Up @@ -251,6 +252,7 @@ impl<O: Offset> MutableArray for MutableUtf8Array<O> {
self
}

#[inline]
fn push_null(&mut self) {
self.push::<&str>(None)
}
Expand Down Expand Up @@ -464,6 +466,7 @@ impl<O: Offset, T: AsRef<str>> TryExtend<Option<T>> for MutableUtf8Array<O> {
}

impl<O: Offset, T: AsRef<str>> TryPush<Option<T>> for MutableUtf8Array<O> {
#[inline]
fn try_push(&mut self, value: Option<T>) -> Result<()> {
match value {
Some(value) => {
Expand Down