-
Line 143 in 90283ad The comments seems to indicate that it is to ensure the type can be contained within the size of a single pointer ( Line 121 in 90283ad But that seems to no longer be the case? #[test]
fn test_size_value() {
use std::mem;
assert_eq!(mem::size_of::<Value>(), 24);
} It just might be that code drifted over time, and comment no longer applies, Asking as a consumer of the crate as this seems to be a fairly convoluted type to use, for no actual benefit? Asking to see if maybe that would be a choice that could be reconsidered? (Before sending a PR) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I agree with your general idea, and I am open to removing the boxes for some types, if you can help decide ultimately do we restrict size of outer
I would rather use the vanilla type though, because |
Beta Was this translation helpful? Give feedback.
I agree with your general idea, and I am open to removing the boxes for some types, if you can help decide ultimately do we restrict size of outer
Value
to be 16 or 24 bytes.assert_eq!(mem::size_of::<Value>(), 24);
can you find out the offender? because it depends on what feature flags are being enabled.I would rather use the vanilla type though, because
Box<str>
is not entirely interchangable withString
for example.