Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumRustCow clone-on-writeSingle-choice MCQ

What does calling `.to_mut()` on a `Cow<'_, str>` that currently holds the `Borrowed` variant do?

let mut c: Cow<str> = Cow::Borrowed("hello"); c.to_mut().push_str(" world");