Skip to content

Commit 098474a

Browse files
committed
Initial buffer allocator
Signed-off-by: Nicholas Gates <nick@nickgates.com>
1 parent 32f6da7 commit 098474a

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

vortex-array/src/memory.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
//! Session-scoped memory allocation for host-side buffers.
55
66
use std::fmt::Debug;
7-
use std::mem::align_of;
87
use std::mem::size_of;
98
use std::sync::Arc;
109

@@ -120,7 +119,7 @@ impl WritableHostBuffer {
120119
let type_align = Alignment::of::<T>();
121120

122121
vortex_ensure!(
123-
byte_len % type_size == 0,
122+
byte_len.is_multiple_of(type_size),
124123
InvalidArgument: "Buffer length {byte_len} is not a multiple of {} for {}",
125124
type_size,
126125
std::any::type_name::<T>()

0 commit comments

Comments
 (0)