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

Commit

Permalink
inline push (#835)
Browse files Browse the repository at this point in the history
  • Loading branch information
ritchie46 authored Feb 14, 2022
1 parent 9e3c3d0 commit dded624
Showing 1 changed file with 3 additions and 0 deletions.
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 @@ -480,6 +482,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

0 comments on commit dded624

Please sign in to comment.