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
I think it'd be great to allow SmartString to work better with Cow. It's great how SmartString already saves memory when the value is owned, but the best you can do with Cow is allow it to be converted to String on write. This all should be possible if there was a SmartStr newtype around str, and SmartStr::Owned = SmartString.
The requirement of implementing Borrow on SmartString means this must be implemented in this crate. The implementation could start with the newtype struct SmartStr(str);, and mostly use safe rust. The only unsafe part may be a transmute for the borrow implementations.