#![allow(unused_variables)] fn main() { use std::borrow::Cow; let s = "Hello world!"; let cow = Cow::Borrowed(s); assert_eq!(cow.into_owned(), String::from(s)); }