File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -277,17 +277,17 @@ fn test_compact_size() {
277
277
// 4 elements size + 1 len + 1 enum tag + [1 drop flag]
278
278
type ByteArray = ArrayVec < u8 , 4 > ;
279
279
println ! ( "{}" , mem:: size_of:: <ByteArray >( ) ) ;
280
- assert ! ( mem:: size_of:: <ByteArray >( ) <= 8 ) ;
280
+ assert ! ( mem:: size_of:: <ByteArray >( ) <= 4 + mem :: size_of :: < usize > ( ) ) ;
281
281
282
282
// just length
283
283
type EmptyArray = ArrayVec < u8 , 0 > ;
284
284
println ! ( "{}" , mem:: size_of:: <EmptyArray >( ) ) ;
285
285
assert ! ( mem:: size_of:: <EmptyArray >( ) <= mem:: size_of:: <usize >( ) ) ;
286
286
287
- // 12 element size + 1 enum tag + 3 padding + 1 len + 1 drop flag + 2 padding
287
+ // 3 elements + padding + length
288
288
type QuadArray = ArrayVec < u32 , 3 > ;
289
289
println ! ( "{}" , mem:: size_of:: <QuadArray >( ) ) ;
290
- assert ! ( mem:: size_of:: <QuadArray >( ) <= 24 ) ;
290
+ assert ! ( mem:: size_of:: <QuadArray >( ) <= 4 * 4 + mem :: size_of :: < usize > ( ) ) ;
291
291
}
292
292
293
293
#[ test]
You can’t perform that action at this time.
0 commit comments