May have to use unsafe code.
This commit is contained in:
parent
9573480973
commit
b9cfa56c2f
@ -55,6 +55,13 @@ impl NewParametersContext {
|
||||
.map(|kvpair| (kvpair.key.to_string(), OwnedRValue::from(&kvpair.value)))
|
||||
.collect();
|
||||
|
||||
let x: String = "foo".to_owned();
|
||||
let y: &dyn ContextElement = &x as _;
|
||||
let owned_y: Box<dyn ContextElement> = Box::new(*y.clone());
|
||||
|
||||
// let owned_breadcrumbs: Vec<Box<dyn ContextElement>> =
|
||||
// breadcrumbs.iter().map(|ce| Box::new(*ce.clone())).collect();
|
||||
|
||||
NewParametersContext {
|
||||
params: owned_params,
|
||||
breadcrumbs: Vec::new(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user