Skip to content

Commit

Permalink
Fix msrv confusion and bit_util::ceil usage
Browse files Browse the repository at this point in the history
  • Loading branch information
itsjunetime committed Nov 8, 2024
1 parent f06cbdc commit 7decbec
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ include = [
"Cargo.toml",
]
edition = "2021"
rust-version = "1.75"
rust-version = "1.70"

[workspace.dependencies]
arrow = { version = "53.2.0", path = "./arrow", default-features = false }
Expand Down
6 changes: 3 additions & 3 deletions arrow-buffer/src/buffer/immutable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use std::sync::Arc;
use crate::alloc::{Allocation, Deallocation, ALIGNMENT};
use crate::util::bit_chunk_iterator::{BitChunks, UnalignedBitChunk};
use crate::BufferBuilder;
use crate::{bytes::Bytes, native::ArrowNativeType};
use crate::{bit_util, bytes::Bytes, native::ArrowNativeType};

use super::ops::bitwise_unary_op_helper;
use super::{MutableBuffer, ScalarBuffer};
Expand Down Expand Up @@ -265,7 +265,7 @@ impl Buffer {
/// otherwise a new buffer is allocated and filled with a copy of the bits in the range.
pub fn bit_slice(&self, offset: usize, len: usize) -> Self {
if offset % 8 == 0 {
return self.slice_with_length(offset / 8, len.div_ceil(8));
return self.slice_with_length(offset / 8, bit_util::ceil(len, 8));
}

bitwise_unary_op_helper(self, offset, len, |a| a)
Expand Down Expand Up @@ -868,7 +868,7 @@ mod tests {

let assert_preserved = |offset: usize, len: usize| {
let new_buf = buf.bit_slice(offset, len);
assert_eq!(new_buf.len(), len.div_ceil(8));
assert_eq!(new_buf.len(), bit_util::ceil(len, 8));

// if the offset is not byte-aligned, we have to create a deep copy to a new buffer
// (since the `offset` value inside a Buffer is byte-granular, not bit-granular), so
Expand Down
2 changes: 1 addition & 1 deletion arrow-pyarrow-integration-testing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ authors = ["Apache Arrow <dev@arrow.apache.org>"]
license = "Apache-2.0"
keywords = [ "arrow" ]
edition = "2021"
rust-version = "1.62"
rust-version = { workspace = true }
publish = false

[lib]
Expand Down
2 changes: 1 addition & 1 deletion arrow/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ include = [
"Cargo.toml",
]
edition = { workspace = true }
rust-version = "1.70.0"
rust-version = { workspace = true }

[lib]
name = "arrow"
Expand Down
2 changes: 1 addition & 1 deletion object_store/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ readme = "README.md"
description = "A generic object store interface for uniformly interacting with AWS S3, Google Cloud Storage, Azure Blob Storage and local files."
keywords = ["object", "storage", "cloud"]
repository = "https://github.com/apache/arrow-rs/tree/master/object_store"
rust-version = "1.64.0"
rust-version = "1.70.0"

[package.metadata.docs.rs]
all-features = true
Expand Down

0 comments on commit 7decbec

Please sign in to comment.