MCPcopy Create free account
hub / github.com/aiscriptdev/aiscript / clone

Method clone

aiscript-arena/src/dynamic_roots.rs:139–149  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

137
138impl<R: for<'gc> Rootable<'gc>> Clone for DynamicRoot<R> {
139 fn clone(&self) -> Self {
140 if let Some(slots) = self.slots.upgrade() {
141 slots.borrow_mut().inc(self.index);
142 }
143
144 Self {
145 ptr: self.ptr,
146 slots: self.slots.clone(),
147 index: self.index,
148 }
149 }
150}
151
152impl<R: for<'gc> Rootable<'gc>> DynamicRoot<R> {

Callers 1

newMethod · 0.45

Calls 3

incMethod · 0.80
upgradeMethod · 0.45
borrow_mutMethod · 0.45

Tested by

no test coverage detected