mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-07 07:27:45 -04:00
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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user