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" |
| 1023 | 1023 | [[package]] |
| 1024 | 1024 | name = "matrix-sdk" |
| 1025 | 1025 | version = "0.2.0" |
| 1026 | | source = "git+https://github.com/matrix-org/matrix-rust-sdk#d90e112c065857b96d4f024794589df24702cbad" |
| 1026 | source = "git+https://github.com/matrix-org/matrix-rust-sdk#8dbbacfbe618c5301490984f4ba63c4633224264" |
| 1027 | 1027 | dependencies = [ |
| 1028 | 1028 | "backoff", |
| 1029 | 1029 | "bytes", |
| @@ -1047,7 +1047,7 @@ dependencies = [ |
| 1047 | 1047 | [[package]] |
| 1048 | 1048 | name = "matrix-sdk-base" |
| 1049 | 1049 | version = "0.2.0" |
| 1050 | | source = "git+https://github.com/matrix-org/matrix-rust-sdk#d90e112c065857b96d4f024794589df24702cbad" |
| 1050 | source = "git+https://github.com/matrix-org/matrix-rust-sdk#8dbbacfbe618c5301490984f4ba63c4633224264" |
| 1051 | 1051 | dependencies = [ |
| 1052 | 1052 | "chacha20poly1305", |
| 1053 | 1053 | "dashmap", |
| @@ -1070,7 +1070,7 @@ dependencies = [ |
| 1070 | 1070 | [[package]] |
| 1071 | 1071 | name = "matrix-sdk-common" |
| 1072 | 1072 | version = "0.2.0" |
| 1073 | | source = "git+https://github.com/matrix-org/matrix-rust-sdk#d90e112c065857b96d4f024794589df24702cbad" |
| 1073 | source = "git+https://github.com/matrix-org/matrix-rust-sdk#8dbbacfbe618c5301490984f4ba63c4633224264" |
| 1074 | 1074 | dependencies = [ |
| 1075 | 1075 | "async-trait", |
| 1076 | 1076 | "futures", |
| @@ -1086,7 +1086,7 @@ dependencies = [ |
| 1086 | 1086 | [[package]] |
| 1087 | 1087 | name = "matrix-sdk-crypto" |
| 1088 | 1088 | version = "0.2.0" |
| 1089 | | source = "git+https://github.com/matrix-org/matrix-rust-sdk#d90e112c065857b96d4f024794589df24702cbad" |
| 1089 | source = "git+https://github.com/matrix-org/matrix-rust-sdk#8dbbacfbe618c5301490984f4ba63c4633224264" |
| 1090 | 1090 | dependencies = [ |
| 1091 | 1091 | "aes-ctr", |
| 1092 | 1092 | "aes-gcm", |
src/server.rs
+3 −4
| @@ -931,8 +931,7 @@ impl InnerServer { |
| 931 | 931 | }; |
| 932 | 932 | |
| 933 | 933 | 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 |
| 936 | 935 | } else { |
| 937 | 936 | c.client() |
| 938 | 937 | .get_device(&own_user_id, &device_info.device_id) |
| @@ -942,8 +941,8 @@ impl InnerServer { |
| 942 | 941 | d.get_key(DeviceKeyAlgorithm::Ed25519).cloned() |
| 943 | 942 | }) |
| 944 | 943 | .flatten() |
| 945 | | .unwrap_or("-".to_owned()) |
| 946 | | }; |
| 944 | } |
| 945 | .unwrap_or_else(|| "-".to_owned()); |
| 947 | 946 | |
| 948 | 947 | let fingerprint = fingerprint |
| 949 | 948 | .chars() |
src/utils.rs
+3 −5
| @@ -22,11 +22,9 @@ impl Edit for MessageEventContent { |
| 22 | 22 | |
| 23 | 23 | fn get_edit(&self) -> Option<(&EventId, &MessageEventContent)> { |
| 24 | 24 | 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())) |
| 30 | 28 | } else { |
| 31 | 29 | None |
| 32 | 30 | } |