tustvold commented on code in PR #2693:
URL: https://github.com/apache/arrow-rs/pull/2693#discussion_r968601879


##########
arrow-buffer/src/alloc/mod.rs:
##########
@@ -20,34 +20,31 @@
 
 use std::alloc::{handle_alloc_error, Layout};
 use std::fmt::{Debug, Formatter};
-use std::mem::size_of;
 use std::panic::RefUnwindSafe;
 use std::ptr::NonNull;
 use std::sync::Arc;
 
 mod alignment;
-mod types;
 
 pub use alignment::ALIGNMENT;
-pub use types::NativeType;
 
 #[inline]
-unsafe fn null_pointer<T: NativeType>() -> NonNull<T> {
-    NonNull::new_unchecked(ALIGNMENT as *mut T)
+unsafe fn null_pointer() -> NonNull<u8> {
+    NonNull::new_unchecked(ALIGNMENT as *mut u8)
 }
 
 /// Allocates a cache-aligned memory region of `size` bytes with uninitialized 
values.
 /// This is more performant than using [allocate_aligned_zeroed] when all 
bytes will have
 /// an unknown or non-zero value and is semantically similar to `malloc`.
-pub fn allocate_aligned<T: NativeType>(size: usize) -> NonNull<T> {
+pub fn allocate_aligned(size: usize) -> NonNull<u8> {

Review Comment:
   Yes, although nothing was actually using this API to allocate anything other 
than bytes



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to