@@ -64,11 +64,6 @@ pub mod text;
6464pub mod text_list;
6565pub mod traits;
6666
67- #[ cfg( feature = "alloc" ) ]
68- use alloc:: string:: String ;
69- #[ cfg( feature = "alloc" ) ]
70- use alloc:: vec:: Vec ;
71-
7267///
7368/// 8 bytes, aligned to an 8-byte boundary.
7469///
@@ -93,7 +88,7 @@ pub const fn word(b0: u8, b1: u8, b2: u8, b3: u8, b4: u8, b5: u8, b6: u8, b7: u8
9388impl Word {
9489 /// Allocates a vec of `length` words, all set to zero.
9590 #[ cfg( feature = "alloc" ) ]
96- pub fn allocate_zeroed_vec ( length : usize ) -> Vec < Self > {
91+ pub fn allocate_zeroed_vec ( length : usize ) -> alloc :: vec :: Vec < Self > {
9792 vec ! [ word( 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ) ; length]
9893 }
9994
@@ -175,7 +170,7 @@ pub struct Error {
175170
176171 /// Extra context about error
177172 #[ cfg( feature = "alloc" ) ]
178- pub extra : String ,
173+ pub extra : alloc :: string :: String ,
179174}
180175
181176/// The general nature of an error. The purpose of this enum is not to describe the error itself,
@@ -411,7 +406,7 @@ impl Error {
411406 }
412407
413408 #[ cfg( feature = "alloc" ) ]
414- pub fn failed ( description : String ) -> Self {
409+ pub fn failed ( description : alloc :: string :: String ) -> Self {
415410 Self {
416411 extra : description,
417412 kind : ErrorKind :: Failed ,
@@ -424,27 +419,27 @@ impl Error {
424419 #[ cfg( feature = "alloc" ) ]
425420 return Self {
426421 kind,
427- extra : String :: new ( ) ,
422+ extra : alloc :: string :: String :: new ( ) ,
428423 } ;
429424 }
430425
431426 #[ cfg( feature = "alloc" ) ]
432- pub fn overloaded ( description : String ) -> Self {
427+ pub fn overloaded ( description : alloc :: string :: String ) -> Self {
433428 Self {
434429 extra : description,
435430 kind : ErrorKind :: Overloaded ,
436431 }
437432 }
438433 #[ cfg( feature = "alloc" ) ]
439- pub fn disconnected ( description : String ) -> Self {
434+ pub fn disconnected ( description : alloc :: string :: String ) -> Self {
440435 Self {
441436 extra : description,
442437 kind : ErrorKind :: Disconnected ,
443438 }
444439 }
445440
446441 #[ cfg( feature = "alloc" ) ]
447- pub fn unimplemented ( description : String ) -> Self {
442+ pub fn unimplemented ( description : alloc :: string :: String ) -> Self {
448443 Self {
449444 extra : description,
450445 kind : ErrorKind :: Unimplemented ,
@@ -628,7 +623,7 @@ pub enum OutputSegments<'a> {
628623 SingleSegment ( [ & ' a [ u8 ] ; 1 ] ) ,
629624
630625 #[ cfg( feature = "alloc" ) ]
631- MultiSegment ( Vec < & ' a [ u8 ] > ) ,
626+ MultiSegment ( alloc :: vec :: Vec < & ' a [ u8 ] > ) ,
632627}
633628
634629impl < ' a > core:: ops:: Deref for OutputSegments < ' a > {
0 commit comments