2121
2222//! Untyped pointer that can be cast to any struct, list, or capability type.
2323
24- #[ cfg( feature = "alloc" ) ]
25- use alloc:: { boxed:: Box , vec:: Vec } ;
26-
2724#[ cfg( feature = "alloc" ) ]
2825use crate :: capability:: FromClientHook ;
2926#[ cfg( feature = "alloc" ) ]
@@ -83,7 +80,10 @@ impl<'a> Reader<'a> {
8380 //# Used by RPC system to implement pipelining. Applications
8481 //# generally shouldn't use this directly.
8582 #[ cfg( feature = "alloc" ) ]
86- pub fn get_pipelined_cap ( & self , ops : & [ PipelineOp ] ) -> Result < Box < dyn ClientHook > > {
83+ pub fn get_pipelined_cap (
84+ & self ,
85+ ops : & [ PipelineOp ] ,
86+ ) -> Result < alloc:: boxed:: Box < dyn ClientHook > > {
8787 let mut pointer = self . reader ;
8888
8989 for op in ops {
@@ -172,7 +172,7 @@ impl<'a> Builder<'a> {
172172
173173 // XXX value should be a user client.
174174 #[ cfg( feature = "alloc" ) ]
175- pub fn set_as_capability ( & mut self , value : Box < dyn ClientHook > ) {
175+ pub fn set_as_capability ( & mut self , value : alloc :: boxed :: Box < dyn ClientHook > ) {
176176 self . builder . set_capability ( value) ;
177177 }
178178
@@ -217,18 +217,18 @@ impl<'a> crate::traits::ImbueMut<'a> for Builder<'a> {
217217pub struct Pipeline {
218218 // XXX this should not be public
219219 #[ cfg( feature = "alloc" ) ]
220- pub hook : Box < dyn PipelineHook > ,
220+ pub hook : alloc :: boxed :: Box < dyn PipelineHook > ,
221221
222222 #[ cfg( feature = "alloc" ) ]
223- ops : Vec < PipelineOp > ,
223+ ops : alloc :: vec :: Vec < PipelineOp > ,
224224}
225225
226226impl Pipeline {
227227 #[ cfg( feature = "alloc" ) ]
228- pub fn new ( hook : Box < dyn PipelineHook > ) -> Self {
228+ pub fn new ( hook : alloc :: boxed :: Box < dyn PipelineHook > ) -> Self {
229229 Self {
230230 hook,
231- ops : Vec :: new ( ) ,
231+ ops : alloc :: vec :: Vec :: new ( ) ,
232232 }
233233 }
234234
@@ -247,7 +247,7 @@ impl Pipeline {
247247
248248 #[ cfg( feature = "alloc" ) ]
249249 pub fn get_pointer_field ( & self , pointer_index : u16 ) -> Self {
250- let mut new_ops = Vec :: with_capacity ( self . ops . len ( ) + 1 ) ;
250+ let mut new_ops = alloc :: vec :: Vec :: with_capacity ( self . ops . len ( ) + 1 ) ;
251251 for op in & self . ops {
252252 new_ops. push ( * op)
253253 }
@@ -264,7 +264,7 @@ impl Pipeline {
264264 }
265265
266266 #[ cfg( feature = "alloc" ) ]
267- pub fn as_cap ( & self ) -> Box < dyn ClientHook > {
267+ pub fn as_cap ( & self ) -> alloc :: boxed :: Box < dyn ClientHook > {
268268 self . hook . get_pipelined_cap ( & self . ops )
269269 }
270270}
@@ -304,7 +304,7 @@ fn init_clears_value() {
304304 assert ! ( root. is_null( ) ) ;
305305 }
306306
307- let mut output: Vec < u8 > = Vec :: new ( ) ;
307+ let mut output: alloc :: vec :: Vec < u8 > = alloc :: vec :: Vec :: new ( ) ;
308308 crate :: serialize:: write_message ( & mut output, & message) . unwrap ( ) ;
309309 assert_eq ! ( output. len( ) , 40 ) ;
310310 for byte in & output[ 8 ..] {
0 commit comments