make a doctest less slow in Miri

This commit is contained in:
Ralf Jung 2024-04-06 12:37:28 +02:00
parent 1242093da2
commit a986c0a100

View file

@ -1062,7 +1062,9 @@ impl<T, A: Allocator> Arc<T, A> {
///
/// // Create a long list and clone it
/// let mut x = LinkedList::new();
/// for i in 0..100000 {
/// let size = 100000;
/// # let size = if cfg!(miri) { 100 } else { size };
/// for i in 0..size {
/// x.push(i); // Adds i to the front of x
/// }
/// let y = x.clone();