mirror of
https://github.com/Dummi26/mers.git
synced 2025-06-14 13:06:14 +02:00
14 lines
325 B
Rust
Executable File
14 lines
325 B
Rust
Executable File
use super::Data;
|
|
|
|
pub fn assign(from: Data, target: &Data) {
|
|
let mut target = target.get_mut();
|
|
if let Some(r) = target
|
|
.mut_any()
|
|
.downcast_mut::<crate::data::reference::Reference>()
|
|
{
|
|
*r.0.get_mut() = from.get().clone();
|
|
} else {
|
|
todo!("assignment to non-reference")
|
|
}
|
|
}
|