From acb74e6aced8f977bab1245998dd082ef261864c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Tue, 10 Sep 2024 10:12:28 +0200 Subject: [PATCH] chore: Upgrade matrix-sdk and ruma --- Cargo.lock | 169 ++++++++---------- Cargo.toml | 10 +- src/components/avatar/mod.rs | 2 +- .../message_row/text/inline_html.rs | 19 +- .../room_history/message_row/text/mod.rs | 2 +- .../room_history/message_row/text/widgets.rs | 34 ++-- src/utils/matrix/mod.rs | 8 +- 7 files changed, 115 insertions(+), 129 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7c01e9db..fc14813f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -16,19 +16,13 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.22.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" +checksum = "f5fb1d8e4442bd405fdfd1dacb42792696b0cf9cb15882e5d097b742a676d375" dependencies = [ "gimli", ] -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - [[package]] name = "adler2" version = "2.0.0" @@ -159,9 +153,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.86" +version = "1.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" +checksum = "10f00e1f6e58a40e807377c75c6a7f97bf9044fab57816f2414e6f5f4499d7b8" [[package]] name = "anymap2" @@ -495,17 +489,17 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.73" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cc", "cfg-if", "libc", - "miniz_oxide 0.7.4", + "miniz_oxide", "object", "rustc-demangle", + "windows-targets", ] [[package]] @@ -629,9 +623,9 @@ checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "bytemuck" -version = "1.17.1" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773d90827bc3feecfb67fab12e24de0749aad83c74b9504ecde46237b5cd24e2" +checksum = "94bbb0ad554ad961ddc5da507a12a29b14e4ae5bda06b19f575a3e6079d2e2ae" [[package]] name = "byteorder" @@ -691,9 +685,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.15" +version = "1.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57b6a275aa2903740dc87da01c62040406b8812552e97129a63ea8850a17c6e6" +checksum = "b62ac837cdb5cb22e10a256099b4fc502b1dfe560cb282963a974d7abd80e476" dependencies = [ "jobserver", "libc", @@ -870,9 +864,9 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" +checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" dependencies = [ "libc", ] @@ -1002,11 +996,10 @@ checksum = "0c03c416ed1a30fbb027ef484ba6ab6f80e1eada675e1a2b92fd673c045a1f1d" [[package]] name = "deadpool" -version = "0.10.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb84100978c1c7b37f09ed3ce3e5f843af02c2a2c431bae5b19230dad2c1b490" +checksum = "6541a3916932fe57768d4be0b1ffb5ec7cbf74ca8c903fdfd5c0fe8aa958f0ed" dependencies = [ - "async-trait", "deadpool-runtime", "num_cpus", "tokio", @@ -1023,9 +1016,9 @@ dependencies = [ [[package]] name = "deadpool-sqlite" -version = "0.7.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8010e36e12f3be22543a5e478b4af20aeead9a700dd69581a5e050a070fc22c" +checksum = "2f9cc6210316f8b7ced394e2a5d2833ce7097fb28afb5881299c61bc18e8e0e9" dependencies = [ "deadpool", "deadpool-sync", @@ -1364,7 +1357,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "324a1be68054ef05ad64b861cc9eaf1d623d2d8cb25b4bf2cb9cdd902b4bf253" dependencies = [ "crc32fast", - "miniz_oxide 0.8.0", + "miniz_oxide", ] [[package]] @@ -1771,9 +1764,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.29.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" +checksum = "32085ea23f3234fc7846555e85283ba4de91e21016dc0455a16286d87a292d64" [[package]] name = "gio" @@ -1807,9 +1800,9 @@ dependencies = [ [[package]] name = "glib" -version = "0.20.2" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c1ea829497810f8e87f5ee6d05c4879af641704add879e6b6080607cceeefe4" +checksum = "95648aac01b75503000bb3bcaa5ec7a7a2dd61e43636b8b1814854de94dd80e4" dependencies = [ "bitflags 2.6.0", "futures-channel", @@ -1828,9 +1821,9 @@ dependencies = [ [[package]] name = "glib-macros" -version = "0.20.2" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "951aa19c5e89555c0ca5e94ee874b24b2594ece8412b387bd84ee3266b8a3ea0" +checksum = "302f1d633c9cdef4350330e7b68fd8016e2834bb106c93fdf9789fcde753c1ab" dependencies = [ "heck", "proc-macro-crate", @@ -2361,9 +2354,9 @@ dependencies = [ [[package]] name = "hashlink" -version = "0.8.4" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" +checksum = "6ba4ff7128dee98c7dc9794b6a411377e1404dba1c97deb8d1a55297bd25d8af" dependencies = [ "hashbrown", ] @@ -2412,9 +2405,9 @@ dependencies = [ [[package]] name = "html5ever" -version = "0.27.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c13771afe0e6e846f1e67d038d4cb29998a6779f93c809212e4e9c32efd244d4" +checksum = "0ff6858c1f7e2a470c5403091866fa95b36fe0dbac5d771f932c15e5ff1ee501" dependencies = [ "log", "mac", @@ -2514,9 +2507,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde7055719c54e36e95e8719f95883f22072a48ede39db7fc17a4e1d5281e9b9" +checksum = "da62f120a8a37763efb0cf8fdf264b884c7b8b9ac8660b900c8661030c00e6ba" dependencies = [ "bytes", "futures-channel", @@ -2674,9 +2667,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.9.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +checksum = "187674a687eed5fe42285b40c6291f9a01517d415fad1c3cbc6a9f778af7fcd4" [[package]] name = "is_terminal_polyfill" @@ -2943,9 +2936,9 @@ dependencies = [ [[package]] name = "libsqlite3-sys" -version = "0.27.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4e226dcd58b4be396f7bd3c20da8fdee2911400705297ba7d2d7cc2c30f716" +checksum = "0c10584274047cb335c23d3e61bcef8e323adae7c5c8c760540f73610177fc3f" dependencies = [ "pkg-config", "vcpkg", @@ -3084,9 +3077,9 @@ checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" [[package]] name = "markup5ever" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16ce3abbeba692c8b8441d036ef91aea6df8da2c6b6e21c7e14d3c18e526be45" +checksum = "d581ff8be69d08a2efa23a959d81aa22b739073f749f067348bd4f4ba4b69195" dependencies = [ "log", "phf", @@ -3137,7 +3130,7 @@ dependencies = [ [[package]] name = "matrix-sdk" version = "0.7.1" -source = "git+https://github.com/zecakeh/matrix-rust-sdk.git?rev=2837564fea7018dfc1e355f6cc051e35ce86ff66#2837564fea7018dfc1e355f6cc051e35ce86ff66" +source = "git+https://github.com/zecakeh/matrix-rust-sdk.git?rev=7a814e3319474e8a5241029af745040b5d58f4a2#7a814e3319474e8a5241029af745040b5d58f4a2" dependencies = [ "anymap2", "aquamarine", @@ -3187,7 +3180,7 @@ dependencies = [ [[package]] name = "matrix-sdk-base" version = "0.7.0" -source = "git+https://github.com/zecakeh/matrix-rust-sdk.git?rev=2837564fea7018dfc1e355f6cc051e35ce86ff66#2837564fea7018dfc1e355f6cc051e35ce86ff66" +source = "git+https://github.com/zecakeh/matrix-rust-sdk.git?rev=7a814e3319474e8a5241029af745040b5d58f4a2#7a814e3319474e8a5241029af745040b5d58f4a2" dependencies = [ "as_variant", "async-trait", @@ -3211,7 +3204,7 @@ dependencies = [ [[package]] name = "matrix-sdk-common" version = "0.7.0" -source = "git+https://github.com/zecakeh/matrix-rust-sdk.git?rev=2837564fea7018dfc1e355f6cc051e35ce86ff66#2837564fea7018dfc1e355f6cc051e35ce86ff66" +source = "git+https://github.com/zecakeh/matrix-rust-sdk.git?rev=7a814e3319474e8a5241029af745040b5d58f4a2#7a814e3319474e8a5241029af745040b5d58f4a2" dependencies = [ "async-trait", "futures-core", @@ -3232,7 +3225,7 @@ dependencies = [ [[package]] name = "matrix-sdk-crypto" version = "0.7.2" -source = "git+https://github.com/zecakeh/matrix-rust-sdk.git?rev=2837564fea7018dfc1e355f6cc051e35ce86ff66#2837564fea7018dfc1e355f6cc051e35ce86ff66" +source = "git+https://github.com/zecakeh/matrix-rust-sdk.git?rev=7a814e3319474e8a5241029af745040b5d58f4a2#7a814e3319474e8a5241029af745040b5d58f4a2" dependencies = [ "aes", "as_variant", @@ -3273,7 +3266,7 @@ dependencies = [ [[package]] name = "matrix-sdk-indexeddb" version = "0.7.0" -source = "git+https://github.com/zecakeh/matrix-rust-sdk.git?rev=2837564fea7018dfc1e355f6cc051e35ce86ff66#2837564fea7018dfc1e355f6cc051e35ce86ff66" +source = "git+https://github.com/zecakeh/matrix-rust-sdk.git?rev=7a814e3319474e8a5241029af745040b5d58f4a2#7a814e3319474e8a5241029af745040b5d58f4a2" dependencies = [ "anyhow", "async-trait", @@ -3301,7 +3294,7 @@ dependencies = [ [[package]] name = "matrix-sdk-qrcode" version = "0.7.1" -source = "git+https://github.com/zecakeh/matrix-rust-sdk.git?rev=2837564fea7018dfc1e355f6cc051e35ce86ff66#2837564fea7018dfc1e355f6cc051e35ce86ff66" +source = "git+https://github.com/zecakeh/matrix-rust-sdk.git?rev=7a814e3319474e8a5241029af745040b5d58f4a2#7a814e3319474e8a5241029af745040b5d58f4a2" dependencies = [ "byteorder", "qrcode", @@ -3313,7 +3306,7 @@ dependencies = [ [[package]] name = "matrix-sdk-sqlite" version = "0.7.1" -source = "git+https://github.com/zecakeh/matrix-rust-sdk.git?rev=2837564fea7018dfc1e355f6cc051e35ce86ff66#2837564fea7018dfc1e355f6cc051e35ce86ff66" +source = "git+https://github.com/zecakeh/matrix-rust-sdk.git?rev=7a814e3319474e8a5241029af745040b5d58f4a2#7a814e3319474e8a5241029af745040b5d58f4a2" dependencies = [ "async-trait", "deadpool-sqlite", @@ -3335,7 +3328,7 @@ dependencies = [ [[package]] name = "matrix-sdk-store-encryption" version = "0.7.0" -source = "git+https://github.com/zecakeh/matrix-rust-sdk.git?rev=2837564fea7018dfc1e355f6cc051e35ce86ff66#2837564fea7018dfc1e355f6cc051e35ce86ff66" +source = "git+https://github.com/zecakeh/matrix-rust-sdk.git?rev=7a814e3319474e8a5241029af745040b5d58f4a2#7a814e3319474e8a5241029af745040b5d58f4a2" dependencies = [ "base64", "blake3", @@ -3354,7 +3347,7 @@ dependencies = [ [[package]] name = "matrix-sdk-ui" version = "0.7.0" -source = "git+https://github.com/zecakeh/matrix-rust-sdk.git?rev=2837564fea7018dfc1e355f6cc051e35ce86ff66#2837564fea7018dfc1e355f6cc051e35ce86ff66" +source = "git+https://github.com/zecakeh/matrix-rust-sdk.git?rev=7a814e3319474e8a5241029af745040b5d58f4a2#7a814e3319474e8a5241029af745040b5d58f4a2" dependencies = [ "as_variant", "async-once-cell", @@ -3448,15 +3441,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" -[[package]] -name = "miniz_oxide" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" -dependencies = [ - "adler", -] - [[package]] name = "miniz_oxide" version = "0.8.0" @@ -3823,9 +3807,9 @@ dependencies = [ [[package]] name = "parking" -version = "2.2.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" [[package]] name = "parking_lot" @@ -4155,9 +4139,9 @@ dependencies = [ [[package]] name = "pulldown-cmark" -version = "0.11.2" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb4e75767fbc9d92b90e4d0c011f61358cde9513b31ef07ea3631b15ffc3b4fd" +checksum = "666f0f59e259aea2d72e6012290c09877a780935cc3c18b1ceded41f3890d59c" dependencies = [ "bitflags 2.6.0", "getopts", @@ -4387,7 +4371,7 @@ dependencies = [ [[package]] name = "ruma" version = "0.10.1" -source = "git+https://github.com/matrix-org/ruma.git?rev=17f6e555528512319e706bb2cfe68a12ec5603b6#17f6e555528512319e706bb2cfe68a12ec5603b6" +source = "git+https://github.com/matrix-org/ruma.git?rev=bb6d4c531aebb571fed4b1948df0118244762741#bb6d4c531aebb571fed4b1948df0118244762741" dependencies = [ "assign", "js_int", @@ -4404,7 +4388,7 @@ dependencies = [ [[package]] name = "ruma-client-api" version = "0.18.0" -source = "git+https://github.com/matrix-org/ruma.git?rev=17f6e555528512319e706bb2cfe68a12ec5603b6#17f6e555528512319e706bb2cfe68a12ec5603b6" +source = "git+https://github.com/matrix-org/ruma.git?rev=bb6d4c531aebb571fed4b1948df0118244762741#bb6d4c531aebb571fed4b1948df0118244762741" dependencies = [ "as_variant", "assign", @@ -4427,7 +4411,7 @@ dependencies = [ [[package]] name = "ruma-common" version = "0.13.0" -source = "git+https://github.com/matrix-org/ruma.git?rev=17f6e555528512319e706bb2cfe68a12ec5603b6#17f6e555528512319e706bb2cfe68a12ec5603b6" +source = "git+https://github.com/matrix-org/ruma.git?rev=bb6d4c531aebb571fed4b1948df0118244762741#bb6d4c531aebb571fed4b1948df0118244762741" dependencies = [ "as_variant", "base64", @@ -4459,7 +4443,7 @@ dependencies = [ [[package]] name = "ruma-events" version = "0.28.1" -source = "git+https://github.com/matrix-org/ruma.git?rev=17f6e555528512319e706bb2cfe68a12ec5603b6#17f6e555528512319e706bb2cfe68a12ec5603b6" +source = "git+https://github.com/matrix-org/ruma.git?rev=bb6d4c531aebb571fed4b1948df0118244762741#bb6d4c531aebb571fed4b1948df0118244762741" dependencies = [ "as_variant", "indexmap", @@ -4484,7 +4468,7 @@ dependencies = [ [[package]] name = "ruma-federation-api" version = "0.9.0" -source = "git+https://github.com/matrix-org/ruma.git?rev=17f6e555528512319e706bb2cfe68a12ec5603b6#17f6e555528512319e706bb2cfe68a12ec5603b6" +source = "git+https://github.com/matrix-org/ruma.git?rev=bb6d4c531aebb571fed4b1948df0118244762741#bb6d4c531aebb571fed4b1948df0118244762741" dependencies = [ "http", "js_int", @@ -4498,7 +4482,7 @@ dependencies = [ [[package]] name = "ruma-html" version = "0.2.0" -source = "git+https://github.com/matrix-org/ruma.git?rev=17f6e555528512319e706bb2cfe68a12ec5603b6#17f6e555528512319e706bb2cfe68a12ec5603b6" +source = "git+https://github.com/matrix-org/ruma.git?rev=bb6d4c531aebb571fed4b1948df0118244762741#bb6d4c531aebb571fed4b1948df0118244762741" dependencies = [ "as_variant", "html5ever", @@ -4511,7 +4495,7 @@ dependencies = [ [[package]] name = "ruma-identifiers-validation" version = "0.9.5" -source = "git+https://github.com/matrix-org/ruma.git?rev=17f6e555528512319e706bb2cfe68a12ec5603b6#17f6e555528512319e706bb2cfe68a12ec5603b6" +source = "git+https://github.com/matrix-org/ruma.git?rev=bb6d4c531aebb571fed4b1948df0118244762741#bb6d4c531aebb571fed4b1948df0118244762741" dependencies = [ "js_int", "thiserror", @@ -4520,8 +4504,9 @@ dependencies = [ [[package]] name = "ruma-macros" version = "0.13.0" -source = "git+https://github.com/matrix-org/ruma.git?rev=17f6e555528512319e706bb2cfe68a12ec5603b6#17f6e555528512319e706bb2cfe68a12ec5603b6" +source = "git+https://github.com/matrix-org/ruma.git?rev=bb6d4c531aebb571fed4b1948df0118244762741#bb6d4c531aebb571fed4b1948df0118244762741" dependencies = [ + "cfg-if", "once_cell", "proc-macro-crate", "proc-macro2", @@ -4535,7 +4520,7 @@ dependencies = [ [[package]] name = "ruma-push-gateway-api" version = "0.9.0" -source = "git+https://github.com/matrix-org/ruma.git?rev=17f6e555528512319e706bb2cfe68a12ec5603b6#17f6e555528512319e706bb2cfe68a12ec5603b6" +source = "git+https://github.com/matrix-org/ruma.git?rev=bb6d4c531aebb571fed4b1948df0118244762741#bb6d4c531aebb571fed4b1948df0118244762741" dependencies = [ "js_int", "ruma-common", @@ -4546,9 +4531,9 @@ dependencies = [ [[package]] name = "rusqlite" -version = "0.30.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a78046161564f5e7cd9008aff3b2990b3850dc8e0349119b98e8f251e099f24d" +checksum = "b838eba278d213a8beaf485bd313fd580ca4505a00d5871caeb1457c55322cae" dependencies = [ "bitflags 2.6.0", "fallible-iterator", @@ -4581,9 +4566,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.35" +version = "0.38.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a85d50532239da68e9addb745ba38ff4612a242c1c7ceea689c4bc7c2f43c36f" +checksum = "3f55e80d50763938498dd5ebb18647174e0c76dc38c5505294bb224624f30f36" dependencies = [ "bitflags 2.6.0", "errno", @@ -4622,11 +4607,11 @@ checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "schannel" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +checksum = "e9aaafd5a2b6e3d657ff009d82fbd630b6bd54dd4eb06f21693925cdf80f9b8b" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -4675,9 +4660,9 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.209" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09" +checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" dependencies = [ "serde_derive", ] @@ -4704,9 +4689,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.209" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" +checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", @@ -4728,9 +4713,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.127" +version = "1.0.128" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad" +checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" dependencies = [ "itoa", "memchr", @@ -5220,9 +5205,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.15" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" +checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1" dependencies = [ "futures-core", "pin-project-lite", @@ -5232,9 +5217,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.11" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" +checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" dependencies = [ "bytes", "futures-core", diff --git a/Cargo.toml b/Cargo.toml index b08bfb33..6be2bd91 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,7 +32,7 @@ linkify = "0.10.0" mime = "0.3" mime_guess = "2" once_cell = "1" -pulldown-cmark = "0.11" +pulldown-cmark = "0.12" qrcode = "0.14" rand = "0.8" regex = "1" @@ -67,7 +67,7 @@ sourceview = { package = "sourceview5", version = "0.9" } [dependencies.matrix-sdk] git = "https://github.com/zecakeh/matrix-rust-sdk.git" -rev = "2837564fea7018dfc1e355f6cc051e35ce86ff66" +rev = "7a814e3319474e8a5241029af745040b5d58f4a2" features = [ "socks", "sso-login", @@ -77,14 +77,12 @@ features = [ [dependencies.matrix-sdk-ui] git = "https://github.com/zecakeh/matrix-rust-sdk.git" -rev = "2837564fea7018dfc1e355f6cc051e35ce86ff66" -default-features = false -features = ["e2e-encryption", "native-tls"] +rev = "7a814e3319474e8a5241029af745040b5d58f4a2" [dependencies.ruma] # version = "0.10" git = "https://github.com/matrix-org/ruma.git" -rev = "17f6e555528512319e706bb2cfe68a12ec5603b6" +rev = "bb6d4c531aebb571fed4b1948df0118244762741" features = [ "unstable-unspecified", "client-api-c", diff --git a/src/components/avatar/mod.rs b/src/components/avatar/mod.rs index eef8b283..84d69c44 100644 --- a/src/components/avatar/mod.rs +++ b/src/components/avatar/mod.rs @@ -144,7 +144,7 @@ mod imp { .replace(vec![image_watch, paintable_watch]); } - self.data.set(data); + self.data.replace(data); self.update_image_size(); self.update_animated_paintable_state(); diff --git a/src/session/view/content/room_history/message_row/text/inline_html.rs b/src/session/view/content/room_history/message_row/text/inline_html.rs index 277a8964..aeaffc2c 100644 --- a/src/session/view/content/room_history/message_row/text/inline_html.rs +++ b/src/session/view/content/room_history/message_row/text/inline_html.rs @@ -95,7 +95,7 @@ impl<'a> InlineHtmlBuilder<'a> { /// constructed, if any. pub(super) fn build_with_nodes( mut self, - nodes: impl IntoIterator>, + nodes: impl IntoIterator, ) -> (String, Option>) { self.append_nodes(nodes, true); self.build() @@ -108,7 +108,7 @@ impl<'a> InlineHtmlBuilder<'a> { /// not removed. pub(super) fn build_with_nodes_text( mut self, - nodes: impl IntoIterator>, + nodes: impl IntoIterator, ) -> String { self.append_nodes_text(nodes); @@ -117,7 +117,7 @@ impl<'a> InlineHtmlBuilder<'a> { } /// Append the given inline node by converting it to Pango markup. - fn append_node(&mut self, node: NodeRef<'a>, should_linkify: bool) { + fn append_node(&mut self, node: NodeRef, should_linkify: bool) { match node.data() { NodeData::Element(data) => { let data = data.to_matrix(); @@ -194,7 +194,7 @@ impl<'a> InlineHtmlBuilder<'a> { } } NodeData::Text(text) => { - let text = text.remove_newlines(); + let text = text.borrow().remove_newlines(); if should_linkify { if let MentionsMode::WithMentions { @@ -220,7 +220,7 @@ impl<'a> InlineHtmlBuilder<'a> { } /// Append the given inline nodes, converted to Pango markup. - fn append_nodes(&mut self, nodes: impl IntoIterator>, should_linkify: bool) { + fn append_nodes(&mut self, nodes: impl IntoIterator, should_linkify: bool) { for node in nodes { self.append_node(node, should_linkify); @@ -236,7 +236,7 @@ impl<'a> InlineHtmlBuilder<'a> { fn append_tags_and_children( &mut self, tag_name: &str, - children: Children<'a>, + children: Children, should_linkify: bool, ) { let _ = write!(self.inner, "<{tag_name}>"); @@ -276,7 +276,7 @@ impl<'a> InlineHtmlBuilder<'a> { /// /// Whether we are an inside an anchor or not decides if we try to linkify /// the text contained in the children nodes. - fn append_span(&mut self, span: &SpanData, children: Children<'a>, should_linkify: bool) { + fn append_span(&mut self, span: &SpanData, children: Children, should_linkify: bool) { self.inner.push_str(" InlineHtmlBuilder<'a> { /// Append the text contained in the nodes to the string. /// /// Returns `true` if the text was ellipsized. - fn append_nodes_text(&mut self, nodes: impl IntoIterator>) { + fn append_nodes_text(&mut self, nodes: impl IntoIterator) { for node in nodes.into_iter() { match node.data() { NodeData::Text(t) => { - let t = t.as_ref(); + let borrowed_t = t.borrow(); + let t = borrowed_t.as_ref(); if self.single_line { if let Some(newline) = t.find(|c: char| c == '\n') { diff --git a/src/session/view/content/room_history/message_row/text/mod.rs b/src/session/view/content/room_history/message_row/text/mod.rs index b5246daf..65cd0ffe 100644 --- a/src/session/view/content/room_history/message_row/text/mod.rs +++ b/src/session/view/content/room_history/message_row/text/mod.rs @@ -317,7 +317,7 @@ impl MessageText { let detect_at_room = self.detect_at_room(); let ellipsize = self.format() == ContentFormat::Ellipsized; - let mut html = Html::parse(html.trim_matches('\n')); + let html = Html::parse(html.trim_matches('\n')); html.sanitize_with(&HTML_MESSAGE_SANITIZER_CONFIG); if !html.has_children() { diff --git a/src/session/view/content/room_history/message_row/text/widgets.rs b/src/session/view/content/room_history/message_row/text/widgets.rs index 98fb0f7e..932cac60 100644 --- a/src/session/view/content/room_history/message_row/text/widgets.rs +++ b/src/session/view/content/room_history/message_row/text/widgets.rs @@ -44,9 +44,9 @@ pub(super) fn new_message_label() -> gtk::Label { /// If the sender name is set, it will be added as soon as possible. /// /// Returns `None` if the widget would have been empty. -pub(super) fn widget_for_html_nodes<'a>( - nodes: impl IntoIterator>, - config: HtmlWidgetConfig<'a>, +pub(super) fn widget_for_html_nodes( + nodes: impl IntoIterator, + config: HtmlWidgetConfig<'_>, add_ellipsis: bool, sender_name: &mut Option<&str>, ) -> Option { @@ -120,17 +120,17 @@ pub(super) fn widget_for_html_nodes<'a>( } /// A group of nodes, representing the nodes contained in a single widget. -enum NodeGroup<'a> { +enum NodeGroup { /// A group of inline nodes. - Inline(Vec>), + Inline(Vec), /// A block node. - Block(NodeRef<'a>), + Block(NodeRef), } /// Group subsequent nodes that are inline. /// /// Allows to group nodes by widget that will need to be constructed. -fn group_inline_nodes(nodes: Vec>) -> Vec> { +fn group_inline_nodes(nodes: Vec) -> Vec { let mut result = Vec::new(); let mut inline_group = None; @@ -161,9 +161,9 @@ fn group_inline_nodes(nodes: Vec>) -> Vec> { /// Construct a `GtkLabel` for the given inline nodes. /// /// Returns `None` if the label would have been empty. -fn label_for_inline_html<'a>( - nodes: impl IntoIterator>, - config: HtmlWidgetConfig<'a>, +fn label_for_inline_html( + nodes: impl IntoIterator, + config: HtmlWidgetConfig<'_>, add_ellipsis: bool, sender_name: &mut Option<&str>, ) -> Option { @@ -201,7 +201,7 @@ fn label_for_inline_html<'a>( /// Create a widget for the given HTML block node. fn widget_for_html_block( - node: NodeRef<'_>, + node: NodeRef, config: HtmlWidgetConfig<'_>, add_ellipsis: bool, sender_name: &mut Option<&str>, @@ -248,7 +248,7 @@ fn widget_for_html_block( /// Create a widget for a list. fn widget_for_list( list_type: ListType, - list_items: Children<'_>, + list_items: Children, config: HtmlWidgetConfig<'_>, add_ellipsis: bool, ) -> Option { @@ -333,7 +333,7 @@ impl From for ListType { /// Create a widget for preformatted text. fn widget_for_preformatted_text( - children: Children<'_>, + children: Children, ellipsize: bool, add_ellipsis: bool, ) -> Option { @@ -405,7 +405,7 @@ fn widget_for_preformatted_text( /// Create a widget for a details disclosure element. fn widget_for_details( - children: Children<'_>, + children: Children, config: HtmlWidgetConfig<'_>, add_ellipsis: bool, ) -> Option { @@ -441,7 +441,7 @@ fn widget_for_details( /// Create a widget for a details disclosure element's summary. fn widget_for_details_summary( - children: Children<'_>, + children: Children, config: HtmlWidgetConfig<'_>, add_ellipsis: bool, ) -> Option { @@ -461,7 +461,9 @@ fn widget_for_details_summary( ) }) }) { - if let Some(widget) = widget_for_html_block(*node, config, add_ellipsis, &mut None) { + if let Some(widget) = + widget_for_html_block(node.clone(), config, add_ellipsis, &mut None) + { return Some(widget); } } diff --git a/src/utils/matrix/mod.rs b/src/utils/matrix/mod.rs index c4f61f4d..aa39ade0 100644 --- a/src/utils/matrix/mod.rs +++ b/src/utils/matrix/mod.rs @@ -340,11 +340,11 @@ pub fn find_html_mentions(html: &str, room: &Room) -> Vec<(Pill, StrTendril)> { /// Find mentions in the given child nodes and append them to the given list. fn append_children_mentions( mentions: &mut Vec<(Pill, StrTendril)>, - children: Children<'_>, + children: Children, room: &Room, ) { for node in children { - if let Some(mention) = node_as_mention(node, room) { + if let Some(mention) = node_as_mention(&node, room) { mentions.push(mention); continue; } @@ -356,7 +356,7 @@ fn append_children_mentions( /// Try to convert the given node to a mention. /// /// This does not recurse into children. -fn node_as_mention(node: NodeRef<'_>, room: &Room) -> Option<(Pill, StrTendril)> { +fn node_as_mention(node: &NodeRef, room: &Room) -> Option<(Pill, StrTendril)> { // Mentions are links. let MatrixElement::A(anchor) = node.as_element()?.to_matrix().element else { return None; @@ -372,7 +372,7 @@ fn node_as_mention(node: NodeRef<'_>, room: &Room) -> Option<(Pill, StrTendril)> return None; } - let content = child.as_text()?.clone(); + let content = child.as_text()?.borrow().clone(); let pill = id.into_pill(room)?; Some((pill, content))