Skip to content

Commit

Permalink
Buffer alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
gatesn committed Dec 18, 2024
1 parent e77ff30 commit ddbd714
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
15 changes: 0 additions & 15 deletions vortex-io/src/io_buf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
use std::ops::Range;

use bytes::Bytes;
use vortex_buffer::Buffer;

/// Trait for types that can provide a readonly byte buffer interface to I/O frameworks.
Expand Down Expand Up @@ -98,20 +97,6 @@ unsafe impl IoBuf for Vec<u8> {
}
}

unsafe impl IoBuf for Bytes {
fn read_ptr(&self) -> *const u8 {
self.as_ptr()
}

fn bytes_init(&self) -> usize {
self.len()
}

fn as_slice(&self) -> &[u8] {
self.as_ref()
}
}

unsafe impl<T: IoBuf> IoBuf for Slice<T> {
#[inline]
fn read_ptr(&self) -> *const u8 {
Expand Down
2 changes: 1 addition & 1 deletion vortex-io/src/object_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use object_store::{GetOptions, GetRange, GetResultPayload, ObjectStore, WriteMul
use vortex_buffer::Buffer;
use vortex_error::{VortexExpect, VortexResult};

use crate::{IoBuf, VortexBufReader, VortexReadAt, VortexWrite, ALIGNMENT};
use crate::{IoBuf, VortexBufReader, VortexReadAt, VortexWrite};

pub trait ObjectStoreExt {
fn vortex_read(
Expand Down

0 comments on commit ddbd714

Please sign in to comment.