109
109
//! [`record`]: super::subscriber::Subscriber::record
110
110
//! [`event`]: super::subscriber::Subscriber::event
111
111
//! [`Value::record`]: Value::record
112
- use crate :: callsite;
113
- use crate :: stdlib:: {
112
+
113
+ use alloc:: { boxed:: Box , string:: String } ;
114
+ use core:: {
114
115
borrow:: Borrow ,
115
116
fmt:: { self , Write } ,
116
117
hash:: { Hash , Hasher } ,
117
118
num,
118
119
ops:: Range ,
119
- string:: String ,
120
120
} ;
121
121
122
122
use self :: private:: ValidLen ;
123
+ use crate :: callsite;
123
124
124
125
/// An opaque key allowing _O_(1) access to a field in a `Span`'s key-value
125
126
/// data.
@@ -649,9 +650,9 @@ impl Value for fmt::Arguments<'_> {
649
650
}
650
651
}
651
652
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 { }
653
654
654
- impl < T : ?Sized > Value for crate :: stdlib :: boxed :: Box < T >
655
+ impl < T : ?Sized > Value for Box < T >
655
656
where
656
657
T : Value ,
657
658
{
@@ -1120,12 +1121,11 @@ mod private {
1120
1121
1121
1122
#[ cfg( test) ]
1122
1123
mod test {
1123
- use alloc:: boxed:: Box ;
1124
+ use alloc:: { borrow :: ToOwned , boxed:: Box , string :: String } ;
1124
1125
use std:: format;
1125
1126
1126
1127
use super :: * ;
1127
1128
use crate :: metadata:: { Kind , Level , Metadata } ;
1128
- use crate :: stdlib:: { borrow:: ToOwned , string:: String } ;
1129
1129
1130
1130
// Make sure TEST_CALLSITE_* have non-zero size, so they can't be located at the same address.
1131
1131
struct TestCallsite1 ( ) ;
@@ -1238,7 +1238,7 @@ mod test {
1238
1238
1239
1239
struct MyVisitor ;
1240
1240
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 ) ) {
1242
1242
assert_eq ! ( field. callsite( ) , TEST_META_1 . callsite( ) )
1243
1243
}
1244
1244
}
@@ -1257,7 +1257,7 @@ mod test {
1257
1257
1258
1258
struct MyVisitor ;
1259
1259
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 ) ) {
1261
1261
assert_eq ! ( field. name( ) , "bar" )
1262
1262
}
1263
1263
}
@@ -1276,7 +1276,7 @@ mod test {
1276
1276
let valueset = fields. value_set ( values) ;
1277
1277
let mut result = String :: new ( ) ;
1278
1278
valueset. record ( & mut |_: & Field , value : & dyn fmt:: Debug | {
1279
- use crate :: stdlib :: fmt:: Write ;
1279
+ use core :: fmt:: Write ;
1280
1280
write ! ( & mut result, "{:?}" , value) . unwrap ( ) ;
1281
1281
} ) ;
1282
1282
assert_eq ! ( result, "123" . to_owned( ) ) ;
0 commit comments