Uncomment unsound code example

This commit is contained in:
Oli Scherer 2022-08-25 10:23:22 +00:00
parent 5c9d28d303
commit 5cd3cc134a

View File

@ -26,6 +26,6 @@ fn extend_lifetime(s: &str) -> Box<dyn AsRef<str> + 'static> {
}
fn main() {
//let extended = extend_lifetime(&String::from("hello"));
//println!("{}", extended.as_ref().as_ref());
let extended = extend_lifetime(&String::from("hello"));
println!("{}", extended.as_ref().as_ref());
}