common: Feature-gate part of doctest
This commit is contained in:
parent
83e46b6aea
commit
22541ba92f
@ -11,8 +11,10 @@ use super::generate_localpart;
|
||||
/// ```
|
||||
/// use ruma_common::{device_id, DeviceId};
|
||||
///
|
||||
/// # #[cfg(feature = "rand")] {
|
||||
/// let random_id = DeviceId::new();
|
||||
/// assert_eq!(random_id.as_str().len(), 8);
|
||||
/// # }
|
||||
///
|
||||
/// let static_id = device_id!("01234567");
|
||||
/// assert_eq!(static_id.as_str(), "01234567");
|
||||
|
Loading…
x
Reference in New Issue
Block a user