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

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

xhochy closed pull request #1847: ARROW-2408: [Rust] Remove build warnings
URL: https://github.com/apache/arrow/pull/1847
 
 
   

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/ci/travis_script_rust.sh b/ci/travis_script_rust.sh
index 4405d036d..6a8ecf081 100755
--- a/ci/travis_script_rust.sh
+++ b/ci/travis_script_rust.sh
@@ -23,8 +23,12 @@ RUST_DIR=${TRAVIS_BUILD_DIR}/rust
 
 pushd $RUST_DIR
 
+# raises on any formatting errors
 rustup component add rustfmt-preview
 cargo fmt --all -- --write-mode=diff
+# raises on any warnings
+cargo rustc -- -D warnings 
+
 cargo build
 cargo test
 
diff --git a/rust/examples/array_from_builder.rs 
b/rust/examples/array_from_builder.rs
index 3a273a64d..ea1ecec45 100644
--- a/rust/examples/array_from_builder.rs
+++ b/rust/examples/array_from_builder.rs
@@ -18,7 +18,6 @@
 extern crate arrow;
 
 use arrow::array::*;
-use arrow::buffer::*;
 use arrow::builder::*;
 
 fn main() {
diff --git a/rust/src/buffer.rs b/rust/src/buffer.rs
index ab90a5b08..1f2ec6c8d 100644
--- a/rust/src/buffer.rs
+++ b/rust/src/buffer.rs
@@ -18,7 +18,6 @@
 use bytes::Bytes;
 use libc;
 use std::mem;
-use std::ptr;
 use std::slice;
 
 use super::memory::*;
diff --git a/rust/src/builder.rs b/rust/src/builder.rs
index 1cc024042..c8ba27477 100644
--- a/rust/src/builder.rs
+++ b/rust/src/builder.rs
@@ -15,11 +15,9 @@
 // specific language governing permissions and limitations
 // under the License.
 
-use bytes::Bytes;
 use libc;
 use std::mem;
 use std::ptr;
-use std::slice;
 
 use super::buffer::*;
 use super::memory::*;
diff --git a/rust/src/datatypes.rs b/rust/src/datatypes.rs
index 85278f7bb..ac2c2c6ea 100644
--- a/rust/src/datatypes.rs
+++ b/rust/src/datatypes.rs
@@ -16,7 +16,6 @@
 // under the License.
 
 use super::error::ArrowError;
-use serde_json;
 use serde_json::Value;
 use std::fmt;
 
@@ -241,6 +240,7 @@ impl fmt::Display for Schema {
 #[cfg(test)]
 mod tests {
     use super::*;
+    use serde_json;
 
     #[test]
     fn create_struct_type() {


 

----------------------------------------------------------------
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:
us...@infra.apache.org


> [Rust] It should be possible to get a &mut[T] from Builder<T>
> -------------------------------------------------------------
>
>                 Key: ARROW-2408
>                 URL: https://issues.apache.org/jira/browse/ARROW-2408
>             Project: Apache Arrow
>          Issue Type: New Feature
>          Components: Rust
>            Reporter: Andy Grove
>            Assignee: Andy Grove
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 0.10.0
>
>
> I am currently adding Arrow support to the parquet-rs crate and I found a 
> need to get a mutable slice from a Buffer<T> to pass to the parquet column 
> reader methods.
>  



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

Reply via email to