sometimes wish rust had reference-counted copy-on-write strings like qt
"you could implement that yourself" yeah i guess but the friction's a bit high
sometimes wish rust had reference-counted copy-on-write strings like qt
"you could implement that yourself" yeah i guess but the friction's a bit high
Rc::make_mut()@whitequark That's an option…
I guess part of the problem is that in Qt, all the *consumers* of my strings can accept QString, whereas I am uncertain the various things I feed strings to will be able to accept it without cloning. We got used to String and copy.
&str should be able to consume a &Rc<String> I think... you might need to throw in an .as_ref()