#![allow(unused_variables)] fn main() { use std::borrow::Cow; let cow: Cow<'_, str> = Cow::Borrowed("eggplant"); let owned: String = String::from(cow); assert_eq!(& owned[..], "eggplant"); }