mirror of
https://github.com/Dummi26/mers.git
synced 2025-12-15 03:36:16 +01:00
completely changed the VData/VDataEnum system: Multiple VData can share one VDataEnum via an Arc<Mutex<VDataEnum>>. If one wants to modify the data, it copies it (Copy on Write). This copying is skipped for shared mutable data (references). This was necessary for the get_ref() function. Expect bugs!
This commit is contained in:
8
get_ref.mers
Normal file
8
get_ref.mers
Normal file
@@ -0,0 +1,8 @@
|
||||
list = [1 2 3 4 5 6 7 8 9 ...]
|
||||
|
||||
second = &list.get_ref(2).assume1()
|
||||
second.debug()
|
||||
*second = 24
|
||||
second.debug()
|
||||
|
||||
list.debug()
|
||||
Reference in New Issue
Block a user