109109//! [`record`]: super::subscriber::Subscriber::record
110110//! [`event`]: super::subscriber::Subscriber::event
111111//! [`Value::record`]: Value::record
112- use crate :: callsite;
113- use crate :: stdlib:: {
112+
113+ use alloc:: { boxed:: Box , string:: String } ;
114+ use core:: {
114115 borrow:: Borrow ,
115116 fmt:: { self , Write } ,
116117 hash:: { Hash , Hasher } ,
117118 num,
118119 ops:: Range ,
119- string:: String ,
120120} ;
121121
122122use self :: private:: ValidLen ;
123+ use crate :: callsite;
123124
124125/// An opaque key allowing _O_(1) access to a field in a `Span`'s key-value
125126/// data.
@@ -649,9 +650,9 @@ impl Value for fmt::Arguments<'_> {
649650 }
650651}
651652
652- impl < T : ?Sized > crate :: sealed:: Sealed for crate :: stdlib :: boxed :: Box < T > where T : Value { }
653+ impl < T : ?Sized > crate :: sealed:: Sealed for Box < T > where T : Value { }
653654
654- impl < T : ?Sized > Value for crate :: stdlib :: boxed :: Box < T >
655+ impl < T : ?Sized > Value for Box < T >
655656where
656657 T : Value ,
657658{
@@ -1120,12 +1121,11 @@ mod private {
11201121
11211122#[ cfg( test) ]
11221123mod test {
1123- use alloc:: boxed:: Box ;
1124+ use alloc:: { borrow :: ToOwned , boxed:: Box , string :: String } ;
11241125 use std:: format;
11251126
11261127 use super :: * ;
11271128 use crate :: metadata:: { Kind , Level , Metadata } ;
1128- use crate :: stdlib:: { borrow:: ToOwned , string:: String } ;
11291129
11301130 // Make sure TEST_CALLSITE_* have non-zero size, so they can't be located at the same address.
11311131 struct TestCallsite1 ( ) ;
@@ -1238,7 +1238,7 @@ mod test {
12381238
12391239 struct MyVisitor ;
12401240 impl Visit for MyVisitor {
1241- fn record_debug ( & mut self , field : & Field , _: & dyn ( crate :: stdlib :: fmt:: Debug ) ) {
1241+ fn record_debug ( & mut self , field : & Field , _: & dyn ( fmt:: Debug ) ) {
12421242 assert_eq ! ( field. callsite( ) , TEST_META_1 . callsite( ) )
12431243 }
12441244 }
@@ -1257,7 +1257,7 @@ mod test {
12571257
12581258 struct MyVisitor ;
12591259 impl Visit for MyVisitor {
1260- fn record_debug ( & mut self , field : & Field , _: & dyn ( crate :: stdlib :: fmt:: Debug ) ) {
1260+ fn record_debug ( & mut self , field : & Field , _: & dyn ( fmt:: Debug ) ) {
12611261 assert_eq ! ( field. name( ) , "bar" )
12621262 }
12631263 }
@@ -1276,7 +1276,7 @@ mod test {
12761276 let valueset = fields. value_set ( values) ;
12771277 let mut result = String :: new ( ) ;
12781278 valueset. record ( & mut |_: & Field , value : & dyn fmt:: Debug | {
1279- use crate :: stdlib :: fmt:: Write ;
1279+ use core :: fmt:: Write ;
12801280 write ! ( & mut result, "{:?}" , value) . unwrap ( ) ;
12811281 } ) ;
12821282 assert_eq ! ( result, "123" . to_owned( ) ) ;
0 commit comments