From 4a86774095017a6a88a761a89b19b35057219f64 Mon Sep 17 00:00:00 2001 From: Aleksander Heintz Date: Sun, 3 Nov 2024 16:24:17 +0100 Subject: [PATCH] feat: BufMut with custom allocator --- crates/aligned-buffer/src/bytes.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/aligned-buffer/src/bytes.rs b/crates/aligned-buffer/src/bytes.rs index 93ae2b4..f840f2e 100644 --- a/crates/aligned-buffer/src/bytes.rs +++ b/crates/aligned-buffer/src/bytes.rs @@ -1,8 +1,10 @@ -use crate::{raw::RawAlignedBuffer, UniqueAlignedBuffer}; +use crate::{alloc::BufferAllocator, raw::RawAlignedBuffer, UniqueAlignedBuffer}; use bytes::{buf::UninitSlice, Buf, BufMut}; use std::ptr; -unsafe impl BufMut for UniqueAlignedBuffer { +unsafe impl> BufMut + for UniqueAlignedBuffer +{ #[inline] fn remaining_mut(&self) -> usize { RawAlignedBuffer::::MAX_CAPACITY - self.len()