[ 
https://issues.apache.org/jira/browse/ARROW-2468?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16443637#comment-16443637
 ] 

ASF GitHub Bot commented on ARROW-2468:
---------------------------------------

xhochy closed pull request #1907: ARROW-2468: [Rust] Builder::slice_mut() 
should take mut self.
URL: https://github.com/apache/arrow/pull/1907
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/rust/src/builder.rs b/rust/src/builder.rs
index e354a2af3..89e00048f 100644
--- a/rust/src/builder.rs
+++ b/rust/src/builder.rs
@@ -65,7 +65,7 @@ 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] {
+    pub fn slice_mut(&mut self, start: usize, end: usize) -> &mut [T] {
         assert!(start <= end);
         assert!(start < self.capacity as usize);
         assert!(end <= self.capacity as usize);


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> [Rust] Builder::slice_mut should take mut self
> ----------------------------------------------
>
>                 Key: ARROW-2468
>                 URL: https://issues.apache.org/jira/browse/ARROW-2468
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: Rust
>            Reporter: Bruce Mitchener
>            Assignee: Bruce Mitchener
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 0.10.0
>
>
> {{Builder}} method {{slice_mut}} should take a {{mut self}} since it gets a 
> mutable reference to data owned by the {{Builder}}.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to