@@ -1056,26 +1056,26 @@ mod tests {
1056
1056
}
1057
1057
1058
1058
#[ cfg_attr(
1059
- not( feature = "heapless-bytes-v0-4 " ) ,
1060
- ignore = "Enable heapless-bytes-v0-4 feature"
1059
+ not( feature = "heapless-bytes-v0-5 " ) ,
1060
+ ignore = "Enable heapless-bytes-v0-5 feature"
1061
1061
) ]
1062
1062
#[ test]
1063
1063
fn de_bytes ( ) {
1064
- #[ cfg( feature = "heapless-bytes-v0-4 " ) ]
1064
+ #[ cfg( feature = "heapless-bytes-v0-5 " ) ]
1065
1065
{
1066
1066
let mut buf = [ 0u8 ; 64 ] ;
1067
1067
1068
1068
let slice = b"thank you postcard!" ;
1069
- let bytes = heapless_bytes_v0_4 :: Bytes :: < 64 > :: try_from ( slice) . unwrap ( ) ;
1069
+ let bytes = heapless_bytes_v0_5 :: Bytes :: < 64 > :: try_from ( slice) . unwrap ( ) ;
1070
1070
let ser = cbor_serialize ( & bytes, & mut buf) . unwrap ( ) ;
1071
1071
println ! ( "serialized bytes = {:?}" , ser) ;
1072
- let de: heapless_bytes_v0_4 :: Bytes < 64 > = from_bytes ( & buf) . unwrap ( ) ;
1072
+ let de: heapless_bytes_v0_5 :: Bytes < 64 > = from_bytes ( & buf) . unwrap ( ) ;
1073
1073
println ! ( "deserialized bytes = {:?}" , & de) ;
1074
1074
assert_eq ! ( & de, slice) ;
1075
1075
}
1076
- #[ cfg( not( feature = "heapless-bytes-v0-4 " ) ) ]
1076
+ #[ cfg( not( feature = "heapless-bytes-v0-5 " ) ) ]
1077
1077
{
1078
- panic ! ( "This test must be run with the heapless-v0-4 feature" )
1078
+ panic ! ( "This test must be run with the heapless-v0-5 feature" )
1079
1079
}
1080
1080
}
1081
1081
@@ -1084,10 +1084,10 @@ mod tests {
1084
1084
let mut buf = [ 0u8 ; 64 ] ;
1085
1085
1086
1086
let string_slice = "thank you postcard, for blazing the path 🐝" ;
1087
- let mut string = heapless_v0_8 :: String :: < 64 > :: new ( ) ;
1087
+ let mut string = heapless_v0_9 :: String :: < 64 > :: new ( ) ;
1088
1088
string. push_str ( string_slice) . unwrap ( ) ;
1089
1089
let _n = cbor_serialize ( & string, & mut buf) ;
1090
- let de: heapless_v0_8 :: String < 64 > = from_bytes ( & buf) . unwrap ( ) ;
1090
+ let de: heapless_v0_9 :: String < 64 > = from_bytes ( & buf) . unwrap ( ) ;
1091
1091
assert_eq ! ( de, string_slice) ;
1092
1092
}
1093
1093
0 commit comments