chore(base): Simplify &* with .as_ref() or .deref().

This patch replaces a `&*` by a `.as_ref()` and a `.deref()`. The result
is the same but it's just simpler for newcomers to understand what
happens.
This commit is contained in:
Ivan Enderlin
2024-10-29 17:10:57 +01:00
parent fbc914f586
commit e5d4ea5964

View File

@@ -13,11 +13,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#[cfg(feature = "e2e-encryption")]
use std::ops::Deref;
use std::{
collections::{BTreeMap, BTreeSet},
fmt, iter,
ops::Deref,
sync::Arc,
};
@@ -252,12 +251,12 @@ impl BaseClient {
/// Get a reference to the store.
#[allow(unknown_lints, clippy::explicit_auto_deref)]
pub fn store(&self) -> &DynStateStore {
&*self.store
self.store.deref()
}
/// Get a reference to the event cache store.
pub fn event_cache_store(&self) -> &DynEventCacheStore {
&*self.event_cache_store
self.event_cache_store.as_ref()
}
/// Is the client logged in.