Skip to content

Commit

Permalink
Replaced deprecated API.
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgecarleitao committed Dec 19, 2020
1 parent 666ac94 commit 8a1c52c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions rust/arrow/src/compute/kernels/comparison.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ macro_rules! compare_op {
let actual_capacity = bit_util::round_upto_multiple_of_64(byte_capacity);
let mut buffer = MutableBuffer::new(actual_capacity);
buffer.resize(byte_capacity);
let data = buffer.raw_data_mut();
let data = buffer.data_mut();

for i in 0..$left.len() {
if $op($left.value(i), $right.value(i)) {
// SAFETY: this is safe as `data` has at least $left.len() elements.
// and `i` is bound by $left.len()
unsafe {
bit_util::set_bit_raw(data, i);
bit_util::set_bit_raw(data.as_mut_ptr(), i);
}
}
}
Expand All @@ -84,14 +84,14 @@ macro_rules! compare_op_scalar {
let actual_capacity = bit_util::round_upto_multiple_of_64(byte_capacity);
let mut buffer = MutableBuffer::new(actual_capacity);
buffer.resize(byte_capacity);
let data = buffer.raw_data_mut();
let data = buffer.data_mut();

for i in 0..$left.len() {
if $op($left.value(i), $right) {
// SAFETY: this is safe as `data` has at least $left.len() elements
// and `i` is bound by $left.len()
unsafe {
bit_util::set_bit_raw(data, i);
bit_util::set_bit_raw(data.as_mut_ptr(), i);
}
}
}
Expand Down

0 comments on commit 8a1c52c

Please sign in to comment.