@@ -10,8 +10,6 @@ use core::{
1010 ptr,
1111} ;
1212
13- use as_slice:: { AsMutSlice , AsSlice } ;
14-
1513use super :: { Init , Node , Uninit } ;
1614
1715/// Instantiates a pool as a global singleton
@@ -80,7 +78,7 @@ pub trait Pool {
8078 /// memory block
8179 fn grow_exact < A > ( memory : & ' static mut MaybeUninit < A > ) -> usize
8280 where
83- A : AsMutSlice < Element = Node < Self :: Data > > ,
81+ A : AsMut < [ Node < Self :: Data > ] > ,
8482 {
8583 Self :: ptr ( ) . grow_exact ( memory)
8684 }
@@ -123,7 +121,7 @@ where
123121impl < P > Box < P , Uninit >
124122where
125123 P : Pool ,
126- P :: Data : AsSlice < Element = u8 > ,
124+ P :: Data : AsRef < [ u8 ] > ,
127125{
128126 /// Freezes the contents of this memory block
129127 ///
@@ -246,28 +244,6 @@ where
246244{
247245}
248246
249- impl < P , T > AsSlice for Box < P >
250- where
251- P : Pool ,
252- P :: Data : AsSlice < Element = T > ,
253- {
254- type Element = T ;
255-
256- fn as_slice ( & self ) -> & [ T ] {
257- self . deref ( ) . as_slice ( )
258- }
259- }
260-
261- impl < P , T > AsMutSlice for Box < P >
262- where
263- P : Pool ,
264- P :: Data : AsMutSlice < Element = T > ,
265- {
266- fn as_mut_slice ( & mut self ) -> & mut [ T ] {
267- self . deref_mut ( ) . as_mut_slice ( )
268- }
269- }
270-
271247impl < P > PartialEq for Box < P >
272248where
273249 P : Pool ,
0 commit comments