This is an automated email from the ASF dual-hosted git repository. apitrou pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/master by this push: new 265142b ARROW-2441: [Rust] Builder<T>::slice_mut assertions are too strict 265142b is described below commit 265142b6a481b027b0cad0d1fff9cb7db41846f3 Author: Andy Grove <andygrov...@gmail.com> AuthorDate: Tue Apr 10 21:43:52 2018 +0200 ARROW-2441: [Rust] Builder<T>::slice_mut assertions are too strict Author: Andy Grove <andygrov...@gmail.com> Closes #1877 from andygrove/builder_slice_fix and squashes the following commits: cb69045 <Andy Grove> BUG FIX: builder.slice_mut assertions were too restrictive 0dd19de <Andy Grove> BUG FIX: builder.slice_mut assertions were too restrictive 8c0e698 <Andy Grove> Merge remote-tracking branch 'upstream/master' 31ef90b <Andy Grove> Merge remote-tracking branch 'upstream/master' 2f87c70 <Andy Grove> Fix build - add missing import --- rust/src/builder.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rust/src/builder.rs b/rust/src/builder.rs index 15f492d..421b1a9 100644 --- a/rust/src/builder.rs +++ b/rust/src/builder.rs @@ -65,8 +65,8 @@ impl<T> Builder<T> { /// Get the internal byte-aligned memory buffer as a mutable slice pub fn slice_mut(&self, start: usize, end: usize) -> &mut [T] { assert!(start <= end); - assert!(start < self.len as usize); - assert!(end <= self.len as usize); + assert!(start < self.capacity as usize); + assert!(end <= self.capacity as usize); unsafe { slice::from_raw_parts_mut(self.data.offset(start as isize), (end - start) as usize) } -- To stop receiving notification emails like this one, please contact apit...@apache.org.