@@ -10,8 +10,6 @@ use core::{
10
10
ptr,
11
11
} ;
12
12
13
- use as_slice:: { AsMutSlice , AsSlice } ;
14
-
15
13
use super :: { Init , Node , Uninit } ;
16
14
17
15
/// Instantiates a pool as a global singleton
@@ -80,7 +78,7 @@ pub trait Pool {
80
78
/// memory block
81
79
fn grow_exact < A > ( memory : & ' static mut MaybeUninit < A > ) -> usize
82
80
where
83
- A : AsMutSlice < Element = Node < Self :: Data > > ,
81
+ A : AsMut < [ Node < Self :: Data > ] > ,
84
82
{
85
83
Self :: ptr ( ) . grow_exact ( memory)
86
84
}
@@ -123,7 +121,7 @@ where
123
121
impl < P > Box < P , Uninit >
124
122
where
125
123
P : Pool ,
126
- P :: Data : AsSlice < Element = u8 > ,
124
+ P :: Data : AsRef < [ u8 ] > ,
127
125
{
128
126
/// Freezes the contents of this memory block
129
127
///
@@ -246,28 +244,6 @@ where
246
244
{
247
245
}
248
246
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
-
271
247
impl < P > PartialEq for Box < P >
272
248
where
273
249
P : Pool ,
0 commit comments