Skip to content

Commit

Permalink
Avoid need for box_syntax feature
Browse files Browse the repository at this point in the history
  • Loading branch information
alecmocatta committed Aug 24, 2019
1 parent 73c3f03 commit 9e8dc2f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 13 deletions.
4 changes: 2 additions & 2 deletions rust/parquet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ edition = "2018"

[dependencies]
parquet-format = "~2.5"
parquet_derive = { version = "0.15.0-SNAPSHOT", path = "./parquet_derive" }
quick-error = "1.2.2"
byteorder = "1"
thrift = "0.0.4"
Expand All @@ -40,9 +41,8 @@ lz4 = "1.23"
zstd = "0.4"
chrono = "0.4"
num-bigint = "0.2"
arrow = { path = "../arrow", version = "0.15.0-SNAPSHOT" }
sum = "0.1"
parquet_derive = { version = "0.13.0-SNAPSHOT", path = "./parquet_derive" }
arrow = { path = "../arrow", version = "0.15.0-SNAPSHOT" }

[dev-dependencies]
lazy_static = "1"
Expand Down
2 changes: 1 addition & 1 deletion rust/parquet/parquet_derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

[package]
name = "parquet_derive"
version = "0.13.0-SNAPSHOT"
version = "0.15.0-SNAPSHOT"
license = "Apache-2.0"
description = "Apache Parquet Derive Macro implementation in Rust"
homepage = "https://github.com/apache/arrow"
Expand Down
1 change: 0 additions & 1 deletion rust/parquet/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
// under the License.

#![feature(specialization)]
#![feature(box_syntax)]
#![feature(type_alias_impl_trait)]
#![feature(core_intrinsics)]
#![allow(dead_code)]
Expand Down
14 changes: 5 additions & 9 deletions rust/parquet/src/record/types/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -309,16 +309,12 @@ macro_rules! impl_parquet_record_array {
),
},
|bytes: Vec<_>| {
let mut ret = box [0u8; $i];
assert_eq!(bytes.len(), ret.len());
unsafe {
std::ptr::copy_nonoverlapping(
bytes.as_ptr(),
ret.as_mut_ptr(),
bytes.len(),
assert_eq!(bytes.len(), $i);
Ok(unsafe {
Box::from_raw(
Box::into_raw(bytes.into_boxed_slice()) as *mut [u8; $i]
)
};
Ok(ret)
})
},
)
}
Expand Down

0 comments on commit 9e8dc2f

Please sign in to comment.