Skip to content

Commit 27fdfa0

Browse files
committed
Merge branch 'main' into alfogrillo/send-voice-message
# Conflicts: # Cargo.lock
2 parents 6961cce + ba2a513 commit 27fdfa0

File tree

35 files changed

+2001
-349
lines changed

35 files changed

+2001
-349
lines changed

.github/workflows/coverage.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ jobs:
6262

6363
- name: Run tarpaulin
6464
run: |
65-
rustup run stable cargo tarpaulin --skip-clean --profile cov --out xml --features testing
65+
rustup run stable cargo tarpaulin \
66+
--skip-clean --profile cov --out xml \
67+
--features experimental-widgets,testing
6668
env:
6769
CARGO_PROFILE_COV_INHERITS: 'dev'
6870
CARGO_PROFILE_COV_DEBUG: 'false'

Cargo.lock

Lines changed: 63 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ thiserror = "1.0.38"
4747
tokio = { version = "1.30.0", default-features = false, features = ["sync"] }
4848
tracing = { version = "0.1.36", default-features = false, features = ["std"] }
4949
tracing-core = "0.1.30"
50-
uniffi = { git = "https://github.com/mozilla/uniffi-rs", rev = "e20b9c2b72144ef51a381c6b321ac810a4fbfdbe" }
51-
uniffi_bindgen = { git = "https://github.com/mozilla/uniffi-rs", rev = "e20b9c2b72144ef51a381c6b321ac810a4fbfdbe" }
50+
uniffi = { git = "https://github.com/mozilla/uniffi-rs", rev = "48b1f51f6e5406cab20f502f535b30a589a5b140" }
51+
uniffi_bindgen = { git = "https://github.com/mozilla/uniffi-rs", rev = "48b1f51f6e5406cab20f502f535b30a589a5b140" }
5252
vodozemac = "0.5.0"
5353
zeroize = "1.6.0"
5454

@@ -80,5 +80,5 @@ inherits = "dev"
8080
opt-level = 3
8181

8282
[patch.crates-io]
83-
async-compat = { git = "https://github.com/jplatte/async-compat", rev = "b83b197622d8b5756d3594ce73b720896b07faae" }
83+
async-compat = { git = "https://github.com/jplatte/async-compat", rev = "16dc8597ec09a6102d58d4e7b67714a35dd0ecb8" }
8484
const_panic = { git = "https://github.com/jplatte/const_panic", rev = "9024a4cb3eac45c1d2d980f17aaee287b17be498" }

bindings/matrix-sdk-crypto-ffi/src/error.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,17 @@ pub enum CryptoStoreError {
5959
Identifier(#[from] IdParseError),
6060
}
6161

62-
#[derive(Debug, uniffi::Error)]
62+
#[derive(Debug, thiserror::Error, uniffi::Error)]
6363
pub enum DecryptionError {
64+
#[error("serialization error: {error}")]
6465
Serialization { error: String },
66+
#[error("identifier parsing error: {error}")]
6567
Identifier { error: String },
68+
#[error("megolm error: {error}")]
6669
Megolm { error: String },
70+
#[error("missing room key: {error}")]
6771
MissingRoomKey { error: String, withheld_code: Option<String> },
72+
#[error("store error: {error}")]
6873
Store { error: String },
6974
}
7075

bindings/matrix-sdk-ffi/src/error.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ use matrix_sdk::{
55
NotificationSettingsError as SdkNotificationSettingsError, StoreError,
66
};
77
use matrix_sdk_ui::{encryption_sync_service, notification_client, sync_service, timeline};
8+
use uniffi::UnexpectedUniFFICallbackError;
89

910
#[derive(Debug, thiserror::Error)]
1011
pub enum ClientError {
@@ -24,6 +25,12 @@ impl From<anyhow::Error> for ClientError {
2425
}
2526
}
2627

28+
impl From<UnexpectedUniFFICallbackError> for ClientError {
29+
fn from(e: UnexpectedUniFFICallbackError) -> Self {
30+
Self::new(e)
31+
}
32+
}
33+
2734
impl From<matrix_sdk::Error> for ClientError {
2835
fn from(e: matrix_sdk::Error) -> Self {
2936
Self::new(e)

bindings/matrix-sdk-ffi/src/room_list.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,17 @@ use crate::{
2323
RUNTIME,
2424
};
2525

26-
#[derive(uniffi::Error)]
26+
#[derive(Debug, thiserror::Error, uniffi::Error)]
2727
pub enum RoomListError {
28+
#[error("sliding sync error: {error}")]
2829
SlidingSync { error: String },
30+
#[error("unknown list `{list_name}`")]
2931
UnknownList { list_name: String },
32+
#[error("input cannot be applied")]
3033
InputCannotBeApplied,
34+
#[error("room `{room_name}` not found")]
3135
RoomNotFound { room_name: String },
36+
#[error("invalid room ID: {error}")]
3237
InvalidRoomId { error: String },
3338
}
3439

0 commit comments

Comments
 (0)