You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ne...@apache.org on 2020/04/29 06:21:43 UTC
[arrow] branch master updated: ARROW-8573: [Rust] Upgrade Rust to
1.44 nightly
This is an automated email from the ASF dual-hosted git repository.
nevime 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 67d4278 ARROW-8573: [Rust] Upgrade Rust to 1.44 nightly
67d4278 is described below
commit 67d4278d21cdf2f9a217163badf6098736cafbc5
Author: Andy Grove <an...@nvidia.com>
AuthorDate: Wed Apr 29 08:21:09 2020 +0200
ARROW-8573: [Rust] Upgrade Rust to 1.44 nightly
Now that Rust 1.43.0 is released, we should upgrade to 1.44 nightly. It looks like there were changes in rustfmt rules.
Closes #7024 from andygrove/rust-nightly-2020-04-22
Lead-authored-by: Andy Grove <an...@nvidia.com>
Co-authored-by: Neville Dipale <ne...@gmail.com>
Signed-off-by: Neville Dipale <ne...@gmail.com>
---
.env | 2 +-
.github/workflows/rust.yml | 6 +++---
ci/docker/debian-10-rust.dockerfile | 2 +-
rust/arrow/src/array/builder.rs | 2 +-
rust/arrow/src/error.rs | 10 ++++------
rust/parquet/src/util/bit_util.rs | 2 +-
rust/parquet/src/util/io.rs | 4 ++--
rust/rust-toolchain | 2 +-
8 files changed, 14 insertions(+), 16 deletions(-)
diff --git a/.env b/.env
index 0d4f057..0340ed7 100644
--- a/.env
+++ b/.env
@@ -28,7 +28,7 @@ FEDORA=30
PYTHON=3.6
LLVM=8
CLANG_TOOLS=8
-RUST=nightly-2019-11-14
+RUST=nightly-2020-04-22
GO=1.12
NODE=11
MAVEN=3.5.4
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index 5938c62..361ca43 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -48,7 +48,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- rust: [nightly-2019-11-14]
+ rust: [nightly-2020-04-22]
env:
RUST: ${{ matrix.rust }}
steps:
@@ -84,7 +84,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- rust: [nightly-2019-11-14]
+ rust: [nightly-2020-04-22]
steps:
- name: Install Rust
uses: actions-rs/toolchain@v1
@@ -116,7 +116,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- rust: [nightly-2019-11-14]
+ rust: [nightly-2020-04-22]
steps:
- name: Install Rust
uses: actions-rs/toolchain@v1
diff --git a/ci/docker/debian-10-rust.dockerfile b/ci/docker/debian-10-rust.dockerfile
index b6c9048..44f0123 100644
--- a/ci/docker/debian-10-rust.dockerfile
+++ b/ci/docker/debian-10-rust.dockerfile
@@ -35,7 +35,7 @@ RUN wget -q -O - https://github.com/google/flatbuffers/archive/v${flatbuffers}.t
# sadly cargo doesn't have a command to fetch and build the
# dependencies without building the library itself
-ARG rust=nightly-2019-11-14
+ARG rust=nightly-2020-04-22
RUN rustup default ${rust}
RUN rustup component add rustfmt --toolchain ${rust}-x86_64-unknown-linux-gnu
diff --git a/rust/arrow/src/array/builder.rs b/rust/arrow/src/array/builder.rs
index 2f09d65..b4f0777 100644
--- a/rust/arrow/src/array/builder.rs
+++ b/rust/arrow/src/array/builder.rs
@@ -229,7 +229,7 @@ impl<T: ArrowPrimitiveType> BufferBuilderTrait<T> for BufferBuilder<T> {
fn capacity(&self) -> usize {
let bit_capacity = self.buffer.capacity() * 8;
- (bit_capacity / T::get_bit_width())
+ bit_capacity / T::get_bit_width()
}
default fn advance(&mut self, i: usize) -> Result<()> {
diff --git a/rust/arrow/src/error.rs b/rust/arrow/src/error.rs
index ff639d1..3662f0a 100644
--- a/rust/arrow/src/error.rs
+++ b/rust/arrow/src/error.rs
@@ -38,19 +38,17 @@ pub enum ArrowError {
impl From<::std::io::Error> for ArrowError {
fn from(error: std::io::Error) -> Self {
- ArrowError::IoError(error.description().to_string())
+ ArrowError::IoError(error.to_string())
}
}
impl From<csv_crate::Error> for ArrowError {
fn from(error: csv_crate::Error) -> Self {
match error.kind() {
- csv_crate::ErrorKind::Io(error) => {
- ArrowError::CsvError(error.description().to_string())
- }
+ csv_crate::ErrorKind::Io(error) => ArrowError::CsvError(error.to_string()),
csv_crate::ErrorKind::Utf8 { pos: _, err } => ArrowError::CsvError(format!(
"Encountered UTF-8 error while reading CSV file: {:?}",
- err.description()
+ err.to_string()
)),
csv_crate::ErrorKind::UnequalLengths {
pos: _,
@@ -68,7 +66,7 @@ impl From<csv_crate::Error> for ArrowError {
impl From<::std::string::FromUtf8Error> for ArrowError {
fn from(error: std::string::FromUtf8Error) -> Self {
- ArrowError::ParseError(error.description().to_string())
+ ArrowError::ParseError(error.to_string())
}
}
diff --git a/rust/parquet/src/util/bit_util.rs b/rust/parquet/src/util/bit_util.rs
index 34541af..90cb3da 100644
--- a/rust/parquet/src/util/bit_util.rs
+++ b/rust/parquet/src/util/bit_util.rs
@@ -659,7 +659,7 @@ impl BitReader {
pub fn get_zigzag_vlq_int(&mut self) -> Option<i64> {
self.get_vlq_int().map(|v| {
let u = v as u64;
- ((u >> 1) as i64 ^ -((u & 1) as i64))
+ (u >> 1) as i64 ^ -((u & 1) as i64)
})
}
diff --git a/rust/parquet/src/util/io.rs b/rust/parquet/src/util/io.rs
index 467c240..df8ede5 100644
--- a/rust/parquet/src/util/io.rs
+++ b/rust/parquet/src/util/io.rs
@@ -254,9 +254,9 @@ mod tests {
// Read data using file chunk
let mut res = vec![0u8; 7];
- let mut chunk = FileSource::new(&file, 0, file.metadata().unwrap().len() as usize);
+ let mut chunk =
+ FileSource::new(&file, 0, file.metadata().unwrap().len() as usize);
chunk.read(&mut res[..]).unwrap();
-
assert_eq!(res, vec![b'a', b'b', b'c', b'd', b'e', b'f', b'g']);
}
diff --git a/rust/rust-toolchain b/rust/rust-toolchain
index e1e0409..f3bb3d3 100644
--- a/rust/rust-toolchain
+++ b/rust/rust-toolchain
@@ -1 +1 @@
-nightly-2019-11-14
+nightly-2020-04-22