@@ -1265,7 +1265,8 @@ mod tests {
12651265 second_device. set_trust_state ( LocalTrust :: Verified ) ;
12661266 bob_device. set_trust_state ( LocalTrust :: Verified ) ;
12671267 alice_machine. inner . store . save_device_data ( & [ bob_device, second_device] ) . await . unwrap ( ) ;
1268- bob_machine. inner . store . save_device_data ( & [ alice_device. clone ( ) ] ) . await . unwrap ( ) ;
1268+ let devices = std:: slice:: from_ref ( & alice_device) ;
1269+ bob_machine. inner . store . save_device_data ( devices) . await . unwrap ( ) ;
12691270
12701271 if create_sessions {
12711272 // Create Olm sessions for our two accounts.
@@ -1486,7 +1487,8 @@ mod tests {
14861487
14871488 // We need a trusted device, otherwise we won't request keys
14881489 alice_device. set_trust_state ( LocalTrust :: Verified ) ;
1489- machine. inner . store . save_device_data ( & [ alice_device. clone ( ) ] ) . await . unwrap ( ) ;
1490+ let devices = std:: slice:: from_ref ( & alice_device) ;
1491+ machine. inner . store . save_device_data ( devices) . await . unwrap ( ) ;
14901492
14911493 let ( outbound, session) = account. create_group_session_pair_with_defaults ( room_id ( ) ) . await ;
14921494 let content = outbound. encrypt ( "m.dummy" , & message_like_event_content ! ( { } ) ) . await ;
@@ -1528,7 +1530,8 @@ mod tests {
15281530
15291531 assert_eq ! ( first_session. first_known_index( ) , 10 ) ;
15301532
1531- machine. inner . store . save_inbound_group_sessions ( & [ first_session. clone ( ) ] ) . await . unwrap ( ) ;
1533+ let sessions = std:: slice:: from_ref ( & first_session) ;
1534+ machine. inner . store . save_inbound_group_sessions ( sessions) . await . unwrap ( ) ;
15321535
15331536 // Get the cancel request.
15341537 let id = machine
@@ -1871,7 +1874,8 @@ mod tests {
18711874 let bob_account = bob_account ( ) ;
18721875 let bob_device = DeviceData :: from_account ( & bob_account) ;
18731876
1874- alice_machine. inner . store . save_device_data ( & [ alice_device. clone ( ) ] ) . await . unwrap ( ) ;
1877+ let devices = std:: slice:: from_ref ( & alice_device) ;
1878+ alice_machine. inner . store . save_device_data ( devices) . await . unwrap ( ) ;
18751879
18761880 // Create Olm sessions for our two accounts.
18771881 let alice_session = alice_machine
@@ -1945,7 +1949,8 @@ mod tests {
19451949
19461950 // We need a trusted device, otherwise we won't serve secrets
19471951 alice_device. set_trust_state ( LocalTrust :: Verified ) ;
1948- alice_machine. inner . store . save_device_data ( & [ alice_device. clone ( ) ] ) . await . unwrap ( ) ;
1952+ let devices = std:: slice:: from_ref ( & alice_device) ;
1953+ alice_machine. inner . store . save_device_data ( devices) . await . unwrap ( ) ;
19491954
19501955 alice_machine. receive_incoming_secret_request ( & event) ;
19511956 {
0 commit comments