File tree 2 files changed +9
-18
lines changed
2 files changed +9
-18
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ release_max_level_info = []
44
44
release_max_level_debug = []
45
45
release_max_level_trace = []
46
46
47
- std = [" value-bag?/std " ]
47
+ std = []
48
48
49
49
kv = []
50
50
kv_sval = [" kv" , " value-bag/sval" , " sval" , " sval_ref" ]
Original file line number Diff line number Diff line change @@ -385,7 +385,7 @@ impl<'v> Value<'v> {
385
385
}
386
386
}
387
387
388
- #[ cfg( feature = "std " ) ]
388
+ #[ cfg( feature = "kv_std " ) ]
389
389
mod std_support {
390
390
use std:: borrow:: Cow ;
391
391
use std:: rc:: Rc ;
@@ -432,29 +432,20 @@ mod std_support {
432
432
}
433
433
}
434
434
435
+ impl < ' v > Value < ' v > {
436
+ /// Try convert this value into a string.
437
+ pub fn to_cow_str ( & self ) -> Option < Cow < ' v , str > > {
438
+ self . inner . to_str ( )
439
+ }
440
+ }
441
+
435
442
impl < ' v > From < & ' v String > for Value < ' v > {
436
443
fn from ( v : & ' v String ) -> Self {
437
444
Value :: from ( & * * v)
438
445
}
439
446
}
440
447
}
441
448
442
- #[ cfg( all( feature = "std" , feature = "value-bag" ) ) ]
443
- impl < ' v > Value < ' v > {
444
- /// Try to convert this value into a string.
445
- pub fn to_cow_str ( & self ) -> Option < std:: borrow:: Cow < ' v , str > > {
446
- self . inner . to_str ( )
447
- }
448
- }
449
-
450
- #[ cfg( all( feature = "std" , not( feature = "value-bag" ) ) ) ]
451
- impl < ' v > Value < ' v > {
452
- /// Try to convert this value into a string.
453
- pub fn to_cow_str ( & self ) -> Option < std:: borrow:: Cow < ' v , str > > {
454
- self . inner . to_borrowed_str ( ) . map ( std:: borrow:: Cow :: Borrowed )
455
- }
456
- }
457
-
458
449
/// A visitor for a [`Value`].
459
450
///
460
451
/// Also see [`Value`'s documentation on seralization]. Value visitors are a simple alternative
You can’t perform that action at this time.
0 commit comments