From 42c4cf2a305c758c3d4a2f6ef386a1d8d038a7b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Thu, 24 Sep 2020 12:00:22 +0200 Subject: [PATCH] crypto: Test the outgoing requests method instead of accessing the field. --- matrix_sdk_crypto/src/key_request.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/matrix_sdk_crypto/src/key_request.rs b/matrix_sdk_crypto/src/key_request.rs index 377b4579..f1ee6b96 100644 --- a/matrix_sdk_crypto/src/key_request.rs +++ b/matrix_sdk_crypto/src/key_request.rs @@ -369,7 +369,7 @@ mod test { fn create_machine() { let machine = get_machine(); - assert!(machine.outgoing_to_device_requests.is_empty()); + assert!(machine.outgoing_to_device_requests().is_empty()); } #[async_test] @@ -382,7 +382,7 @@ mod test { .await .unwrap(); - assert!(machine.outgoing_to_device_requests.is_empty()); + assert!(machine.outgoing_to_device_requests().is_empty()); machine .create_outgoing_key_request( session.room_id(), @@ -391,8 +391,8 @@ mod test { ) .await .unwrap(); - assert!(!machine.outgoing_to_device_requests.is_empty()); - assert_eq!(machine.outgoing_to_device_requests.len(), 1); + assert!(!machine.outgoing_to_device_requests().is_empty()); + assert_eq!(machine.outgoing_to_device_requests().len(), 1); machine .create_outgoing_key_request(