// `impl From> for String` (alloc/src/string.rs), so `Box: Into`: // pulldown-cmark strings.rs `CowStr::Boxed(s) => s.into()`. #[test] fn box_str_into_string() { let b: Box = "hello".into(); let s: String = b.into(); assert_eq!(s, "hello"); let b: Box = Box::from(""); assert_eq!(String::from(b), ""); let b: Box = String::from("abc").into_boxed_str(); let mut s = String::from(b); s.push('d'); assert_eq!(s, "abcd"); }