mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-15 03:25:46 -04:00
This implementation is wrong in the sense of its semantics is not about dereferencing a thin pointer to something, but just to give access to one specific field of the entire structure. That's not how `Deref` is supposed to be used. Moreover, it creates conflict between the `SlidingSyncRoom.timeline` field, and `SlidingSyncRoom.inner.timeline` field, which both exist, but not for the same purposes. It creates confusion in the code. Finally, it's better to expose proper getters to the outside world, so that we control _and_ test _and_ know exactly what API we provide.