Open lo48576 opened 3 years ago
std::ops::Deref should be only used for smart pointer types, and it is considered as an anti pattern to use it to "derive" parent type.
std::ops::Deref
Deref should only be implemented for smart pointers to avoid confusion. --- https://doc.rust-lang.org/stable/std/ops/trait.Deref.html
Deref should only be implemented for smart pointers to avoid confusion.
--- https://doc.rust-lang.org/stable/std/ops/trait.Deref.html
Currently, some object types abuse Deref trait, and this use of Deref should be removed in future.
Deref
v7400::object::**::*Handle
ObjectHandle
v7400::data::mesh::layer::*Handle
tree::v7400::NodeHandle
Not the biggest fan of macros, but delegate! might be useful. https://crates.io/crates/delegate
delegate!
std::ops::Deref
should be only used for smart pointer types, and it is considered as an anti pattern to use it to "derive" parent type.Currently, some object types abuse
Deref
trait, and this use ofDeref
should be removed in future.v7400::object::**::*Handle
(includingObjectHandle
)v7400::data::mesh::layer::*Handle
(includingtree::v7400::NodeHandle
)