nkemjika.eth
@nkemjika
Today in Rust References and the concept of borrowing. Understanding that reference are immutable and to compensate for that, there are Mutable references. You can as well dereference but I am not certain of usecase for this yet. When borrowing, it is important to be mindful of multiple reference types on the same data, ie mutable and immutable types don't always sit well together*, So ensure that immutable references go out of scope before mutating. Also dangle errors, a situation where a memory location might not exist is handled by rust. See you after tomorrow's 6am cold run.
0 reply
1 recast
2 reactions