You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by uw...@apache.org on 2018/05/01 10:13:13 UTC

[arrow] branch master updated: ARROW-2507: [Rust] Don't take a reference when not needed.

This is an automated email from the ASF dual-hosted git repository.

uwe 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 4ac7b29  ARROW-2507: [Rust] Don't take a reference when not needed.
4ac7b29 is described below

commit 4ac7b29395f80f3bc928a65350375ee95e0efdfa
Author: Bruce Mitchener <br...@gmail.com>
AuthorDate: Tue May 1 12:13:06 2018 +0200

    ARROW-2507: [Rust] Don't take a reference when not needed.
    
    Since this is already a reference value, we don't need to borrow it again.
    
    Author: Bruce Mitchener <br...@gmail.com>
    
    Closes #1941 from waywardmonkeys/remove-useless-reference and squashes the following commits:
    
    6f782ad1 <Bruce Mitchener> ARROW-2507:  Don't take a reference when not needed.
---
 rust/src/list.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rust/src/list.rs b/rust/src/list.rs
index 8c4da10..f1e9e6a 100644
--- a/rust/src/list.rs
+++ b/rust/src/list.rs
@@ -54,7 +54,7 @@ impl<T> List<T> {
     pub fn slice(&self, index: usize) -> &[T] {
         let start = *self.offsets.get(index) as usize;
         let end = *self.offsets.get(index + 1) as usize;
-        &self.data.slice(start, end)
+        self.data.slice(start, end)
     }
 }
 

-- 
To stop receiving notification emails like this one, please contact
uwe@apache.org.