Skip to content

Commit 8270304

Browse files
gnunicornjplatte
authored andcommitted
Fix build warnings and clippy lints
1 parent 2f67b62 commit 8270304

File tree

10 files changed

+17
-17
lines changed

10 files changed

+17
-17
lines changed

crates/matrix-sdk-base/src/client.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -583,9 +583,9 @@ impl BaseClient {
583583
}
584584
}
585585

586-
changes.members.insert((&*room_id).to_owned(), members);
587-
changes.profiles.insert((&*room_id).to_owned(), profiles);
588-
changes.state.insert((&*room_id).to_owned(), state_events);
586+
changes.members.insert((*room_id).to_owned(), members);
587+
changes.profiles.insert((*room_id).to_owned(), profiles);
588+
changes.state.insert((*room_id).to_owned(), state_events);
589589

590590
Ok(user_ids)
591591
}

crates/matrix-sdk-crypto/src/identities/manager.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ impl IdentityManager {
207207
user_id: Box<UserId>,
208208
device_map: BTreeMap<Box<DeviceId>, Raw<DeviceKeys>>,
209209
) -> StoreResult<DeviceChanges> {
210-
let own_device_id = (&*own_device_id).to_owned();
210+
let own_device_id = (*own_device_id).to_owned();
211211

212212
let mut changes = DeviceChanges::default();
213213

@@ -420,7 +420,7 @@ impl IdentityManager {
420420
let result = private_identity.clear_if_differs(identity).await;
421421

422422
if result.any_cleared() {
423-
changed_identity = Some((&*private_identity).clone());
423+
changed_identity = Some((*private_identity).clone());
424424
info!(cleared =? result, "Removed some or all of our private cross signing keys");
425425
}
426426
}

crates/matrix-sdk-crypto/src/olm/account.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,7 @@ impl ReadOnlyAccount {
763763
DeviceKeys::new(
764764
(*self.user_id).to_owned(),
765765
(*self.device_id).to_owned(),
766-
Self::ALGORITHMS.iter().map(|a| (&**a).clone()).collect(),
766+
Self::ALGORITHMS.iter().map(|a| (**a).clone()).collect(),
767767
keys,
768768
BTreeMap::new(),
769769
)

crates/matrix-sdk-crypto/src/olm/group_sessions/inbound.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,8 @@ impl InboundGroupSession {
200200
PickledInboundGroupSession {
201201
pickle: InboundGroupSessionPickle::from(pickle),
202202
sender_key: self.sender_key.to_string(),
203-
signing_key: (&*self.signing_keys).clone(),
204-
room_id: (&*self.room_id).to_owned(),
203+
signing_key: (*self.signing_keys).clone(),
204+
room_id: (*self.room_id).to_owned(),
205205
forwarding_chains: self.forwarding_key_chain().to_vec(),
206206
imported: self.imported,
207207
backed_up: self.backed_up(),
@@ -261,11 +261,11 @@ impl InboundGroupSession {
261261

262262
ExportedRoomKey {
263263
algorithm: EventEncryptionAlgorithm::MegolmV1AesSha2,
264-
room_id: (&*self.room_id).to_owned(),
265-
sender_key: (&*self.sender_key).to_owned(),
264+
room_id: (*self.room_id).to_owned(),
265+
sender_key: (*self.sender_key).to_owned(),
266266
session_id: self.session_id().to_owned(),
267267
forwarding_curve25519_key_chain: self.forwarding_key_chain().to_vec(),
268-
sender_claimed_keys: (&*self.signing_keys).clone(),
268+
sender_claimed_keys: (*self.signing_keys).clone(),
269269
session_key,
270270
}
271271
}

crates/matrix-sdk-crypto/src/olm/group_sessions/outbound.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ impl OutboundGroupSession {
300300
ciphertext,
301301
sender_key: self.account_identity_keys.curve25519().to_owned(),
302302
session_id: self.session_id().to_owned(),
303-
device_id: (&*self.device_id).to_owned(),
303+
device_id: (*self.device_id).to_owned(),
304304
}
305305
.into();
306306

crates/matrix-sdk-crypto/src/olm/session.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ impl Session {
139139
let ciphertext = CiphertextInfo::new(ciphertext.1, (message_type as u32).into());
140140

141141
let mut content = BTreeMap::new();
142-
content.insert((&*self.sender_key).to_owned(), ciphertext);
142+
content.insert((*self.sender_key).to_owned(), ciphertext);
143143

144144
Ok(EncryptedEventScheme::OlmV1Curve25519AesSha2(OlmV1Curve25519AesSha2Content::new(
145145
content,

crates/matrix-sdk-crypto/src/olm/signing/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ impl PrivateCrossSigningIdentity {
451451

452452
let mut signed_keys = BTreeMap::new();
453453
signed_keys
454-
.entry((&*self.user_id).to_owned())
454+
.entry((*self.user_id).to_owned())
455455
.or_insert_with(BTreeMap::new)
456456
.insert(device_keys.device_id.to_string(), serde_json::to_value(device_keys)?);
457457

crates/matrix-sdk-crypto/src/store/caches.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ impl GroupSessionStore {
9090
/// already in the store.
9191
pub fn add(&self, session: InboundGroupSession) -> bool {
9292
self.entries
93-
.entry((&*session.room_id).to_owned())
93+
.entry((*session.room_id).to_owned())
9494
.or_insert_with(HashMap::new)
9595
.entry(session.sender_key.to_string())
9696
.or_insert_with(HashMap::new)

crates/matrix-sdk-crypto/src/verification/requests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -952,7 +952,7 @@ impl RequestState<Ready> {
952952
request_handle: RequestHandle,
953953
) -> Result<Sas, OutgoingContent> {
954954
Sas::from_start_event(
955-
(&*self.flow_id).to_owned(),
955+
(*self.flow_id).to_owned(),
956956
content,
957957
self.store.clone(),
958958
self.private_cross_signing_identity.clone(),

crates/matrix-sdk/src/client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1689,7 +1689,7 @@ impl Client {
16891689
Request: OutgoingRequest + Debug,
16901690
HttpError: From<FromHttpResponseError<Request::EndpointError>>,
16911691
{
1692-
Ok(self.inner.http_client.send(request, config).await?)
1692+
self.inner.http_client.send(request, config).await
16931693
}
16941694

16951695
/// Get information of all our own devices.

0 commit comments

Comments
 (0)