You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A lot of accesskit APIs end up using Box<str> as their string type, which is not very idiomatic for Rust.
As far as I can tell, the reason is to save space in the PropertyValue enum. But that enum also has a few variants that are as large or larger than a String, meaning storing a Box<str> doesn't actually save space:
NodeIdVec has a Vec.
The Rect variant holds 4 f64
CustomActionVec has a Vec.
Should these variants be boxed? As far as I can tell every other type is two pointers long at most.
The text was updated successfully, but these errors were encountered:
A lot of accesskit APIs end up using
Box<str>
as their string type, which is not very idiomatic for Rust.As far as I can tell, the reason is to save space in the
PropertyValue
enum. But that enum also has a few variants that are as large or larger than a String, meaning storing aBox<str>
doesn't actually save space:NodeIdVec
has a Vec.Rect
variant holds 4f64
CustomActionVec
has a Vec.Should these variants be boxed? As far as I can tell every other type is two pointers long at most.
The text was updated successfully, but these errors were encountered: