Commit 945e2cf079

945e2cf0791b68140303e03aacf4e7f5a0e160e4

parent: 01e3a863fd

Unsigned

Damir Jelić <poljar@termina.org.uk> · 2021-05-06 19:59 UTC

weechat-matrix: Fix some new clippy warnings

Layout: unified · split

Cargo.lock +4 −4
@@ -1023,7 +1023,7 @@ checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08"
10231023[[package]]
10241024name = "matrix-sdk"
10251025version = "0.2.0"
1026source = "git+https://github.com/matrix-org/matrix-rust-sdk#d90e112c065857b96d4f024794589df24702cbad"
1026source = "git+https://github.com/matrix-org/matrix-rust-sdk#8dbbacfbe618c5301490984f4ba63c4633224264"
10271027dependencies = [
10281028 "backoff",
10291029 "bytes",
@@ -1047,7 +1047,7 @@ dependencies = [
10471047[[package]]
10481048name = "matrix-sdk-base"
10491049version = "0.2.0"
1050source = "git+https://github.com/matrix-org/matrix-rust-sdk#d90e112c065857b96d4f024794589df24702cbad"
1050source = "git+https://github.com/matrix-org/matrix-rust-sdk#8dbbacfbe618c5301490984f4ba63c4633224264"
10511051dependencies = [
10521052 "chacha20poly1305",
10531053 "dashmap",
@@ -1070,7 +1070,7 @@ dependencies = [
10701070[[package]]
10711071name = "matrix-sdk-common"
10721072version = "0.2.0"
1073source = "git+https://github.com/matrix-org/matrix-rust-sdk#d90e112c065857b96d4f024794589df24702cbad"
1073source = "git+https://github.com/matrix-org/matrix-rust-sdk#8dbbacfbe618c5301490984f4ba63c4633224264"
10741074dependencies = [
10751075 "async-trait",
10761076 "futures",
@@ -1086,7 +1086,7 @@ dependencies = [
10861086[[package]]
10871087name = "matrix-sdk-crypto"
10881088version = "0.2.0"
1089source = "git+https://github.com/matrix-org/matrix-rust-sdk#d90e112c065857b96d4f024794589df24702cbad"
1089source = "git+https://github.com/matrix-org/matrix-rust-sdk#8dbbacfbe618c5301490984f4ba63c4633224264"
10901090dependencies = [
10911091 "aes-ctr",
10921092 "aes-gcm",
src/server.rs +3 −4
@@ -931,8 +931,7 @@ impl InnerServer {
931931 };
932932
933933 let fingerprint = if is_own_device {
934 // TODO we need to be able to fetch this
935 "TODO".to_owned()
934 c.client().ed25519_key().await
936935 } else {
937936 c.client()
938937 .get_device(&own_user_id, &device_info.device_id)
@@ -942,8 +941,8 @@ impl InnerServer {
942941 d.get_key(DeviceKeyAlgorithm::Ed25519).cloned()
943942 })
944943 .flatten()
945 .unwrap_or("-".to_owned())
946 };
944 }
945 .unwrap_or_else(|| "-".to_owned());
947946
948947 let fingerprint = fingerprint
949948 .chars()
src/utils.rs +3 −5
@@ -22,11 +22,9 @@ impl Edit for MessageEventContent {
2222
2323 fn get_edit(&self) -> Option<(&EventId, &MessageEventContent)> {
2424 if let Some(Relation::Replacement(r)) = self.relates_to.as_ref() {
25 if let Some(content) = self.new_content.as_ref() {
26 Some((&r.event_id, &*content))
27 } else {
28 None
29 }
25 self.new_content
26 .as_ref()
27 .map(|content| (&r.event_id, content.as_ref()))
3028 } else {
3129 None
3230 }