Rework of FFI, adding a value identifier, so we can keep knowledge of data even when data moves.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -14,8 +14,8 @@ pub trait DataLibrary<'a, T: 'a> {
|
||||
fn get_modify(&mut self) -> &mut IndexMap<StringKey, Arc<T>>;
|
||||
|
||||
/// Adds a new value to the library.
|
||||
fn add(&mut self, key: &StringKey, value: T) {
|
||||
self.get_modify().insert(key.clone(), Arc::new(value));
|
||||
fn add(&mut self, key: &StringKey, value: Arc<T>) {
|
||||
self.get_modify().insert(key.clone(), value);
|
||||
}
|
||||
|
||||
/// Removes a value from the library.
|
||||
|
||||
Reference in New Issue
Block a user