@@ -1224,9 +1224,9 @@ impl OlmMachine {
1224
1224
/// ```
1225
1225
/// # use std::convert::TryFrom;
1226
1226
/// # use matrix_sdk_crypto::OlmMachine;
1227
- /// # use ruma::UserId ;
1227
+ /// # use ruma::{device_id, user_id} ;
1228
1228
/// # use futures::executor::block_on;
1229
- /// # let alice = Box::<UserId>::try_from ("@alice:example.org").unwrap ();
1229
+ /// # let alice = user_id! ("@alice:example.org").to_owned ();
1230
1230
/// # let machine = OlmMachine::new(&alice, device_id!("DEVICEID"));
1231
1231
/// # block_on(async {
1232
1232
/// let device = machine.get_device(&alice, device_id!("DEVICEID")).await;
@@ -1265,9 +1265,9 @@ impl OlmMachine {
1265
1265
/// ```
1266
1266
/// # use std::convert::TryFrom;
1267
1267
/// # use matrix_sdk_crypto::OlmMachine;
1268
- /// # use ruma::UserId ;
1268
+ /// # use ruma::{device_id, user_id} ;
1269
1269
/// # use futures::executor::block_on;
1270
- /// # let alice = Box::<UserId>::try_from ("@alice:example.org").unwrap ();
1270
+ /// # let alice = user_id! ("@alice:example.org").to_owned ();
1271
1271
/// # let machine = OlmMachine::new(&alice, device_id!("DEVICEID"));
1272
1272
/// # block_on(async {
1273
1273
/// let devices = machine.get_user_devices(&alice).await.unwrap();
@@ -1301,7 +1301,7 @@ impl OlmMachine {
1301
1301
/// ```no_run
1302
1302
/// # use std::io::Cursor;
1303
1303
/// # use matrix_sdk_crypto::{OlmMachine, decrypt_key_export};
1304
- /// # use ruma::user_id;
1304
+ /// # use ruma::{device_id, user_id} ;
1305
1305
/// # use futures::executor::block_on;
1306
1306
/// # let alice = user_id!("@alice:example.org");
1307
1307
/// # let machine = OlmMachine::new(&alice, device_id!("DEVICEID"));
@@ -1413,13 +1413,13 @@ impl OlmMachine {
1413
1413
///
1414
1414
/// ```no_run
1415
1415
/// # use matrix_sdk_crypto::{OlmMachine, encrypt_key_export};
1416
- /// # use ruma::{user_id, room_id};
1416
+ /// # use ruma::{device_id, user_id, room_id};
1417
1417
/// # use futures::executor::block_on;
1418
1418
/// # let alice = user_id!("@alice:example.org");
1419
1419
/// # let machine = OlmMachine::new(&alice, device_id!("DEVICEID"));
1420
1420
/// # block_on(async {
1421
1421
/// let room_id = room_id!("!test:localhost");
1422
- /// let exported_keys = machine.export_keys(|s| s.room_id() == & room_id).await.unwrap();
1422
+ /// let exported_keys = machine.export_keys(|s| s.room_id() == room_id).await.unwrap();
1423
1423
/// let encrypted_export = encrypt_key_export(&exported_keys, "1234", 1);
1424
1424
/// # });
1425
1425
/// ```
0 commit comments