@@ -10,12 +10,11 @@ macro_rules! cryptostore_integration_tests {
1010 use matrix_sdk_test:: async_test;
1111 use ruma:: {
1212 device_id,
13- encryption:: SignedKey ,
1413 events:: secret:: request:: SecretName ,
1514 room_id,
16- serde:: { Base64 , Raw } ,
15+ serde:: Raw ,
1716 to_device:: DeviceIdOrAllDevices ,
18- user_id, DeviceId , JsOption , OwnedDeviceId , OwnedUserId , RoomId , TransactionId , UserId
17+ user_id, DeviceId , RoomId , TransactionId , UserId
1918 } ;
2019 use serde_json:: value:: to_raw_value;
2120 use $crate:: {
@@ -24,7 +23,7 @@ macro_rules! cryptostore_integration_tests {
2423 PrivateCrossSigningIdentity , Account , Session ,
2524 } ,
2625 store:: {
27- BackupKeys , Changes , CryptoStore , DeviceChanges ,
26+ Changes , CryptoStore , DeviceChanges ,
2827 GossipRequest , IdentityChanges , BackupDecryptionKey , RoomSettings , PendingChanges ,
2928 } ,
3029 testing:: { get_device, get_other_identity, get_own_identity} ,
@@ -300,7 +299,7 @@ macro_rules! cryptostore_integration_tests {
300299 get_loaded_store( "mark_inbound_group_sessions_as_backed_up" ) . await ;
301300 let room_id = & room_id!( "!test:localhost" ) ;
302301 let mut sessions: Vec <InboundGroupSession > = Vec :: with_capacity( 10 ) ;
303- for i in 0 ..10 {
302+ for _i in 0 ..10 {
304303 sessions. push( account. create_group_session_pair_with_defaults( room_id) . await . 1 ) ;
305304 }
306305 let changes = Changes { inbound_group_sessions: sessions. clone( ) , ..Default :: default ( ) } ;
@@ -312,7 +311,7 @@ macro_rules! cryptostore_integration_tests {
312311 }
313312
314313 // When I mark some as backed up
315- let x = store. mark_inbound_group_sessions_as_backed_up( & [
314+ store. mark_inbound_group_sessions_as_backed_up( & [
316315 session_info( & sessions[ 1 ] ) ,
317316 session_info( & sessions[ 3 ] ) ,
318317 session_info( & sessions[ 5 ] ) ,
@@ -378,7 +377,7 @@ macro_rules! cryptostore_integration_tests {
378377 let room_id = & room_id!( "!test:localhost" ) ;
379378 let ( _, session) = account. create_group_session_pair_with_defaults( room_id) . await ;
380379
381- let mut export = session. export( ) . await ;
380+ let export = session. export( ) . await ;
382381
383382 let session = InboundGroupSession :: from_export( & export) . unwrap( ) ;
384383
@@ -399,7 +398,7 @@ macro_rules! cryptostore_integration_tests {
399398 . unwrap( )
400399 . unwrap( ) ;
401400 assert_eq!( session, loaded_session) ;
402- let export = loaded_session. export( ) . await ;
401+ loaded_session. export( ) . await ;
403402
404403 assert_eq!( store. get_inbound_group_sessions( ) . await . unwrap( ) . len( ) , 1 ) ;
405404 assert_eq!( store. inbound_group_session_counts( ) . await . unwrap( ) . total, 1 ) ;
@@ -427,13 +426,13 @@ macro_rules! cryptostore_integration_tests {
427426 let loaded_alice =
428427 loaded. get( alice) . expect( "Alice should be in the store as a tracked user" ) ;
429428 let loaded_bob =
430- loaded. get( alice ) . expect( "Bob should be in the store as as tracked user" ) ;
429+ loaded. get( bob ) . expect( "Bob should be in the store as as tracked user" ) ;
431430
432431 assert!( !loaded. contains_key( candy) , "Candy shouldn't be part of the store" ) ;
433432 assert_eq!( loaded. len( ) , 2 , "Candy shouldn't be part of the store" ) ;
434433
435434 assert!( loaded_alice. dirty, "Alice should be considered to be dirty" ) ;
436- assert!( loaded_alice . dirty, "Bob should not be considered to be dirty" ) ;
435+ assert!( !loaded_bob . dirty, "Bob should not be considered to be dirty" ) ;
437436 } ;
438437
439438 let loaded = store. load_tracked_users( ) . await . unwrap( ) ;
@@ -850,7 +849,7 @@ macro_rules! cryptostore_integration_tests {
850849
851850 #[ async_test]
852851 async fn room_settings_saving( ) {
853- let ( account , store) = get_loaded_store( "room_settings_saving" ) . await ;
852+ let ( _ , store) = get_loaded_store( "room_settings_saving" ) . await ;
854853
855854 let room_1 = room_id!( "!test_1:localhost" ) ;
856855 let settings_1 = RoomSettings {
@@ -915,7 +914,7 @@ macro_rules! cryptostore_integration_tests {
915914
916915 #[ async_test]
917916 async fn custom_value_saving( ) {
918- let ( account , store) = get_loaded_store( "custom_value_saving" ) . await ;
917+ let ( _ , store) = get_loaded_store( "custom_value_saving" ) . await ;
919918 store. set_custom_value( "A" , "Hello" . as_bytes( ) . to_vec( ) ) . await . unwrap( ) ;
920919
921920 let loaded_1 = store. get_custom_value( "A" ) . await . unwrap( ) ;
0 commit comments