first-rust-competition / nt-rs

Rust implementation of NetworkTables (v3)
MIT License
8 stars 6 forks source link

Replace <arc object>.clone() with Arc::clone(&obj) #11

Closed RyanHir closed 3 years ago

RyanHir commented 3 years ago

Prevent potential collision with underlying object with potential clone method.

While current code is properly using Arc::clone internally, It can potentially get mixed up in the future.

This is discussed in the rust docs here... https://doc.rust-lang.org/std/sync/struct.Arc.html#deref-behavior

Redrield commented 3 years ago

Thank you for your contribution!