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
To avoid an issue where allocated heap memory may be deallocated with a different layout alignment than it was officially allocated with when converting between std::string::String and SmartString, even if otherwise correctly aligned, the respective From implementations now use std::alloc::Allocator::grow() to re-align the heap data as necessary. An unfortunate consequence of this is that because the std::alloc::Allocator API hasn't been stabilised yet, unless you're on nightly or some future stable rustc version after allocator_api has been stabilised, converting between String and SmartString will always reallocate and copy (making it always O(n) rather than O(1) when correctly aligned and O(n) otherwise). (#28)