Skip to content

Commit c95f026

Browse files
Merge pull request #66 from antiguru/export_bytemuck
Export bytemuck crate
2 parents ab2de5c + bf2fa42 commit c95f026

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

columnar_derive/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -493,14 +493,14 @@ fn derive_unit_struct(name: &syn::Ident, _generics: &syn::Generics, vis: syn::Vi
493493
// type Borrowed<'columnar> = #c_ident;
494494
#[inline(always)]
495495
fn as_bytes(&self) -> impl Iterator<Item=(u64, &'a [u8])> {
496-
std::iter::once((8, bytemuck::cast_slice(std::slice::from_ref(self.count))))
496+
std::iter::once((8, ::columnar::bytemuck::cast_slice(std::slice::from_ref(self.count))))
497497
}
498498
}
499499

500500
impl<'columnar> ::columnar::FromBytes<'columnar> for #c_ident <&'columnar u64> {
501501
#[inline(always)]
502502
fn from_bytes(bytes: &mut impl Iterator<Item=&'columnar [u8]>) -> Self {
503-
Self { count: &bytemuck::try_cast_slice(bytes.next().unwrap()).unwrap()[0] }
503+
Self { count: &::columnar::bytemuck::try_cast_slice(bytes.next().unwrap()).unwrap()[0] }
504504
}
505505
}
506506

src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ pub use columnar_derive::Columnar;
1212

1313
pub mod adts;
1414

15+
pub use bytemuck;
16+
1517
/// A type that can be represented in columnar form.
1618
///
1719
/// For a running example, a type like `(A, Vec<B>)`.

0 commit comments

Comments
 (0)