Not having much luck.

This commit is contained in:
Tom Alexander 2020-05-10 18:45:54 -04:00
parent b9cfa56c2f
commit 6fb329388f
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

View File

@ -57,7 +57,11 @@ impl NewParametersContext {
let x: String = "foo".to_owned();
let y: &dyn ContextElement = &x as _;
let owned_y: Box<dyn ContextElement> = Box::new(*y.clone());
// let owned_y: Box<dyn ContextElement> = Box::new(*y.clone());
// unsafe {
// let ce = &mut *y.clone() as *mut dyn ContextElement;
// Box::from_raw(ce);
// }
// let owned_breadcrumbs: Vec<Box<dyn ContextElement>> =
// breadcrumbs.iter().map(|ce| Box::new(*ce.clone())).collect();