Lines Matching refs:empty

3528     let empty = "";
3529 let s: String = empty.chars().collect();
3530 assert_eq!(empty, s);
3610 let empty: &[&str] = &[];
3611 test_concat!("", empty);
3636 let empty: &[&str] = &[];
3637 test_join!("", empty, "-");
3649 let empty: &[&str] = &[];
3650 test_join!("", empty, "~~~~~");
5878 let empty: String = split.split_off(orig.len());
5879 assert!(empty.is_empty());
8235 v.extend(std::iter::empty::<i32>()); // `TrustedLen` specialization with empty iterator
8262 next_then_drop(v.splice(5.., vec![1, 2, 3, 4, 5])); // empty tail after range
8930 panic!("Adding empty strings to a borrow should note allocate");
8933 panic!("Adding empty strings to a borrow should note allocate");
8936 panic!("Adding empty strings to a borrow should note allocate");
8939 panic!("Adding empty strings to a borrow should note allocate");
8956 panic!("Adding empty strings to a borrow should note allocate");
8959 panic!("Adding empty strings to a borrow should note allocate");
8962 panic!("Adding empty strings to a borrow should note allocate");
8980 panic!("Adding empty strings to a borrow should note allocate");
8986 panic!("Adding empty strings to a borrow should note allocate");
8992 panic!("Adding empty strings to a borrow should note allocate");
8998 panic!("Adding empty strings to a borrow should note allocate");
9020 panic!("Adding empty strings to a borrow should note allocate");
9026 panic!("Adding empty strings to a borrow should note allocate");
9032 panic!("Adding empty strings to a borrow should note allocate");
10376 let empty = Vec::<i32>::new();
10377 test_show_vec!(empty, "[]");
10509 let empty: &[u8] = &[];
10510 assert!(empty.starts_with(empty));
10511 assert!(!empty.starts_with(b"foo"));
10512 assert!(b"foobar".starts_with(empty));
10523 let empty: &[u8] = &[];
10524 assert!(empty.ends_with(empty));
10525 assert!(!empty.ends_with(b"foo"));
10526 assert!(b"foobar".ends_with(empty));
12875 // Split search (both front & back non-empty):
12913 // Split search (both front & back non-empty):
13535 let empty = BinaryHeap::<i32>::new();
13536 assert!(empty.peek().is_none());
13541 let mut empty = BinaryHeap::<i32>::new();
13542 assert!(empty.peek_mut().is_none());
13906 /// Also, note that `vec![expr; 0]` is allowed, and produces an empty vector.
16515 /// Creates a new empty `String`.
16517 /// Given that the `String` is empty, this will not allocate any initial
16540 /// Creates a new empty `String` with a particular capacity.
16544 /// method. This method creates an empty `String`, but one with an initial
17312 /// Returns [`None`] if this `String` is empty.
18181 /// Creates an empty `String`.
21475 /// let empty: Weak<i64> = Weak::new();
21476 /// assert!(empty.upgrade().is_none());
21839 /// let empty: Weak<i64> = Default::default();
21840 /// assert!(empty.upgrade().is_none());
22878 /// The two slices must be non-empty and `mid` must be in bounds. Buffer `buf` must be long enough
24892 /// let empty: Weak<i64> = Weak::new();
24893 /// assert!(empty.upgrade().is_none());
25257 /// let empty: Weak<i64> = Default::default();
25258 /// assert!(empty.upgrade().is_none());
27316 /// Creates an empty `LinkedList<T>`.
27324 /// Creates an empty `LinkedList`.
27343 /// this operation, `other` becomes empty.
27466 /// The cursor is pointing to the "ghost" non-element if the list is empty.
27475 /// The cursor is pointing to the "ghost" non-element if the list is empty.
27484 /// The cursor is pointing to the "ghost" non-element if the list is empty.
27493 /// The cursor is pointing to the "ghost" non-element if the list is empty.
27500 /// Returns `true` if the `LinkedList` is empty.
27600 /// empty.
27620 /// is empty.
27646 /// empty.
27666 /// is empty.
27714 /// empty.
27757 /// it is empty.
28056 /// When created, cursors start at the front of the list, or the "ghost" non-element if the list is empty.
28814 // Empty to empty
28823 // Non-empty to empty
28835 // Empty to non-empty
28847 // Non-empty to non-empty
29821 // An empty map may be represented both by the absence of a root node or by a
29822 // root node that is an empty leaf.
30021 clone_subtree(self.root.as_ref().unwrap().reborrow()) // unwrap succeeds because not empty
30264 /// Makes a new, empty `BTreeMap`.
30277 /// // entries can now be inserted into the empty map
30752 /// Moves all elements from `other` into `Self`, leaving `other` empty.
30790 // We can just swap `self` and `other` if `self` is empty.
30962 let left_root = self.root.as_mut().unwrap(); // unwrap succeeds because not empty
31766 /// Creates an empty `BTreeMap`.
32004 /// If the root node is the empty (non-allocated) root node, allocate our
32158 /// Creates a tree consisting of empty nodes.
32393 /// Makes a new, empty `BTreeSet`.
32680 /// This is equivalent to checking for an empty intersection.
32735 return true; // self is empty
32741 return false; // other is empty
33037 /// Moves all elements from `other` into `Self`, leaving `other` empty.
33339 /// Creates an empty `BTreeSet`.
33645 // and T is an empty type, the storage overhead of sets limits
33787 /// the range, returns a pair of empty options.
34722 let empty = BTreeSet::<i32>::new();
34730 assert_eq!(format!("{:?}", empty), "{}");
35155 /// Ensures a value is in the entry by inserting the default if empty, and returns
35176 /// Ensures a value is in the entry by inserting the result of the default function if empty,
35199 /// Ensures a value is in the entry by inserting, if empty, the result of the default function.
35284 /// Ensures a value is in the entry by inserting the default value if empty,
36483 fn empty() {
36495 assert!(map.drain_filter(|_, _| false).eq(iter::empty()));
36519 .eq(iter::empty())
37484 // Two leafs where the second one ends up empty because the insertion finished at the root.
37488 // Three levels; insertion finished at leaf while there is an empty node on the second level.
37876 /// return the same empty pair.
37950 // This implies that even an empty node has at least one edge.
37952 // since leaf edges are empty and need no data representation. In an internal node,
38469 /// Returns a new owned tree, with its own root node that is initially empty.
39081 /// Panics if the parent is empty.
39106 Err(_) => unreachable!("empty internal node"),
39454 /// Move the suffix after `self` from one node to another one. `right` must be empty.
39738 /// an empty root.
39781 /// root node became empty.
39784 /// and panics if it encounters an empty ancestor.
39797 /// Removes empty levels on the top, but keeps an empty leaf if the entire tree is empty.
40246 let (empty, buf) = buf.split_at(0);
40247 (buf.slice(tail, head), empty)
40346 // Move a1 into a0, if it's empty (and b1, b0 the same way).
40444 // If tail == head the buffer is empty. The length of the ringbuffer
40500 /// Creates an empty `VecDeque<T>`.
40808 /// Creates an empty `VecDeque`.
40822 /// Creates an empty `VecDeque` with space for at least `capacity` elements.
40833 // +1 since the ringbuffer always leaves one space empty
41141 // can ever be `usize::MAX`. +1 as the ringbuffer always leaves one space empty.
41317 /// `VecDeque` will be in the first slice and the second slice will be empty.
41352 /// `VecDeque` will be in the first slice and the second slice will be empty.
41402 /// Returns `true` if the `VecDeque` is empty.
41634 /// empty.
41654 /// `VecDeque` is empty.
41678 /// empty.
41698 /// `VecDeque` is empty.
41722 /// empty.
41749 /// it is empty.
42045 // copy last element into empty spot at bottom of buffer
42069 // copy last element into empty spot at bottom of buffer
42089 // copy last element into empty spot at bottom of buffer
42262 // copy first element into empty spot
42286 // copy last element into empty spot
42370 /// Moves all the elements of `other` into `self`, leaving `other` empty.
43884 // 0, 1, 2, .., at - 1 (may be empty)
43886 // at, at + 1, .., len - 1 (may be empty)
44475 /// // The heap should now be empty.
44546 // SAFETY: PeekMut is only instantiated for non-empty heaps.
44557 // SAFE: PeekMut is only instantiated for non-empty heaps
44567 // SAFE: PeekMut is only instantiated for non-empty heaps
44595 /// Creates an empty `BinaryHeap<T>`.
44610 /// Creates an empty `BinaryHeap` as a max-heap.
44626 /// Creates an empty `BinaryHeap` with a specific capacity.
44646 /// `None` if it is empty.
44680 /// is empty.
44970 /// Moves all the elements of `other` into `self`, leaving `other` empty.
45111 /// Returns the greatest item in the binary heap, or `None` if it is empty.
45310 /// Checks if the binary heap is empty.
46456 // empty, but the loop in extend_desugared() is not going to see the
46472 // to spec_from for empty Vecs
46629 // to spec_from for empty Vecs
47057 /// For example, a vector with capacity 10 and length 0 would be an empty vector
47081 /// on an empty Vec, it will not allocate memory. Similarly, if you store zero-sized
47128 /// `Vec` will never automatically shrink itself, even if completely empty. This
47192 /// Constructs a new, empty `Vec<T>`.
47209 /// Constructs a new, empty `Vec<T>` with the specified capacity.
47323 /// Constructs a new, empty `Vec<T, A>`.
47343 /// Constructs a new, empty `Vec<T, A>` with the specified capacity with the provided
48032 /// // 1. `old_len..0` is empty so no elements need to be initialized.
48454 /// is empty.
48476 /// Moves all the elements of `other` into `Self`, leaving `other` empty.
49334 /// * The tail (elements in the vector after `range`) is empty,
49483 /// Creates an empty `Vec<T>`.