Lines Matching refs:one
2872 let one = list_from(&[1.0f64]);
2873 assert!(!(n < one));
2874 assert!(!(n > one));
2875 assert!(!(n <= one));
2876 assert!(!(n >= one));
2888 assert!(s > one);
2889 assert!(!(s <= one));
2890 assert!(s >= one);
2898 let list: LinkedList<_> = vec!["just", "one", "test", "more"].iter().cloned().collect();
2899 assert_eq!(format!("{:?}", list), "[\"just\", \"one\", \"test\", \"more\"]");
5025 let x = "There are moments, Jeeves, when one asks oneself, 'Do trousers matter?'";
6876 // Other elements are dropped when `drop` of one element panicked.
7553 assert_eq!(Rc::strong_count(&drop_count[1]), 2, "one element was collected");
8836 // This should clone&append one Panic{..} at the end, and then panic while
10931 // ... and then panic on each and every single one.
11798 // shift values 1 step to the right by pop, sub one, push
11817 // shift values 1 step to the right by pop, sub one, push
11855 let ringbuf: VecDeque<_> = vec!["just", "one", "test", "more"].iter().cloned().collect();
11856 assert_eq!(format!("{:?}", ringbuf), "[\"just\", \"one\", \"test\", \"more\"]");
12180 // and the one getting appended are generated to check `append`.
13900 /// This will use `clone` to duplicate an expression, so one should be careful
14043 /// if there is one, or the `std` crate’s default.
14059 /// if there is one, or the `std` crate’s default.
14093 /// if there is one, or the `std` crate’s default.
14111 /// if there is one, or the `std` crate’s default.
14129 /// if there is one, or the `std` crate’s default.
14589 // Sanity-check one half of the safety requirement (we cannot check the other half).
14966 // only one location which panics rather than a bunch throughout the module.
14974 //! The `&str` type is one of the two main string types, the other being `String`.
15120 // the first slice is the only one without a separator preceding it
15909 // If/when custom thin DSTs exist, this test should be updated to use one
16189 //! You can create a new [`String`] from an existing one by concatenating with
16466 /// an analogue to `FromUtf8Error`, and you can get one from a `FromUtf8Error`
16544 /// method. This method creates an empty `String`, but one with an initial
17966 // one allocation by getting the first string from the iterator
17993 // one allocation by getting the first item and appending to it all the
19312 //! The [`Box`] type is a smart pointer type. There can only be one owner of a
19318 //! with boxes because each node often has only one owner, the parent.
19582 //! unique ownership, because more than one gadget may belong to the same
19646 //! place. In order to end up with two values that point at each other, one of
19841 // if the weak pointer is stored inside the strong one.
19990 // if the weak pointer is stored inside the strong one.
20070 /// Returns the inner value, if the `Rc` has exactly one strong reference.
20409 /// provided pointer by one.
20442 /// provided pointer by one.
21541 /// one weak reference (the weak count is not modified by this operation). It can be turned
21577 /// It takes ownership of one weak reference (with the exception of pointers created by [`new`],
21586 /// takes ownership of one weak reference currently represented as a raw pointer (the weak
21984 //! let str_slice: &[&str] = &["one", "two", "three"];
22211 /// two or more sorted sequences concatenated one after another.
22241 /// * total and antisymmetric: exactly one of `a < b`, `a == b` or `a > b` is true, and
22262 /// two or more sorted sequences concatenated one after another.
22305 /// two or more sorted sequences concatenated one after another.
22817 // 1. Swap adjacent elements until the first one gets to its final destination.
22831 // All methods were benchmarked, and the 3rd showed best results. So we chose that one.
22890 // copying the lesser (or greater) one into `v`.
23086 // Finally, exactly one run must remain in the stack.
23343 /// [`Mutex`][mutex], [`RwLock`][rwlock], or one of the [`Atomic`][atomic]
23844 /// Returns the inner value, if the `Arc` has exactly one strong reference.
24224 /// provided pointer by one.
24259 /// provided pointer by one.
24545 // reference, and passing an existing reference from one thread to
24665 // either unique to begin with, or became one upon cloning the contents.
24819 // > It is important to enforce any possible access to the object in one
24953 /// one weak reference (the weak count is not modified by this operation). It can be turned
24989 /// It takes ownership of one weak reference (with the exception of pointers created by [`new`],
24998 /// takes ownership of one weak reference currently represented as a raw pointer (the weak
25075 // from zero to one.
25133 // Since we observed that there was at least one strong pointer
25297 // weak count can only be locked if there was precisely one weak ref,
25978 //! the negative version has one fewer zero than the positive version.
26007 //! `.*` means that this `{...}` is associated with *two* format inputs rather than one: the
26009 //! in this case, if one uses the format string `{<arg>:<spec>.*}`, then the `<arg>` part refers
26706 // If/when custom thin DSTs exist, this test should be updated to use one
27166 let node = unsafe { node.as_mut() }; // this one is ours now, we can create an &mut.
27927 // panicked. If another one panics this will abort.
28310 /// Inserts a new element into the `LinkedList` after the current one.
28330 /// Inserts a new element into the `LinkedList` before the current one.
28390 /// Inserts the elements from the given `LinkedList` after the current one.
28413 /// Inserts the elements from the given `LinkedList` before the current one.
29273 // An iterator for merging two sorted sequences into one
29587 /// the nearest node that has at least one key contained in the range.
29840 /// efficiency, one could search the nodes linearly. For optimal comparisons, one could search
29841 /// the node using binary search. As a compromise, one could also perform a linear search
29877 /// // check for a specific one.
29879 /// println!("We've got {} reviews, but Les Misérables ain't one.",
30125 /// A simplified version of `IntoIter` that is not double-ended and has only one
32214 /// // Check for a specific one.
32216 /// println!("We have {} books, but The Winds of Winter ain't one.",
32939 /// one. Returns the replaced value.
32989 /// Removes and returns the value in the set, if any, that is equal to the given one.
33920 /// If the leaf edge is the last one in the tree, returns [`Result::Err`] with the root node.
33941 /// If the leaf edge is the first one in the tree, returns [`Result::Err`] with the root node.
33966 /// If the internal edge is the last one in the tree, returns [`Result::Err`] with the root node.
34571 let one = [1].iter().collect::<BTreeSet<_>>();
34573 assert!(one.is_disjoint(&two));
36898 a.insert(1, "one");
36906 assert_eq!(a[&1], "one");
37482 // Two leafs where the second one ends up underfull and needs stealing at the end.
37484 // Two leafs where the second one ends up empty because the insertion finished at the root.
37872 /// is equal and occurs in both sources. If one of the returned options
37950 // This implies that even an empty node has at least one edge.
38031 /// An invariant of internal nodes is that they have at least one
38086 /// or for one particular type. For example, we cannot define a method like
38411 // We only create a reference to the one element we are interested in,
38485 /// As it is intended only to be called when the root node has only one child,
38624 /// pairs. For example, in a node with length 2, there would be 3 possible edge locations - one
38625 /// to the left of the node, one between the two pairs, and one at the right of the node.
38954 // We cannot call separate key and value methods, because calling the second one
39182 // SAFETY: the height of the nodes being merged is one below the height
39288 // Move elements from the left child to the right one.
39356 // Move elements from the right child to the left one.
39454 /// Move the suffix after `self` from one node to another one. `right` must be empty.
39564 /// Inserts a value into a slice of initialized elements followed by one uninitialized element.
39580 /// Removes and returns a value from a slice of all initialized elements, leaving behind one
40628 /// most one continuous overlapping region between src and dest).
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.
41257 // in the first one panics.
42289 // move elements from tail to end forward, excluding the last one
42494 /// Rearranges the internal storage of this deque so it is one contiguous
42565 // there is enough free space to copy the tail in one go,
42587 // there is enough free space to copy the head in one go,
42759 /// one of the matches could be returned. If the value is not found then
42819 /// one of the matches could be returned. If the value is not found then
42871 /// one of the matches could be returned. If the value is not found then
43217 // doesn't have at least one free space. We do this while it's still in
43249 /// // This one is *O*(1).
43256 /// // This one needs data rearranging.
44368 //! // from one node to another.
44369 //! // Note that the edges are one-way.
44483 /// value instead of the greatest one.
45757 /// Creates a consuming iterator, that is, one that moves each value out of
46796 // one slot in the underlying storage will have been freed up and we can immediately
47159 /// this a side-effect that must be preserved. There is one case which we will
47272 /// It's also not safe to build one from a `Vec<u16>` and its length, because
47410 /// It's also not safe to build one from a `Vec<u16>` and its length, because
47967 /// is done using one of the safe operations instead, such as
48039 /// Normally, here, one would use [`clear`] instead to correctly drop
48862 // - `spare_ptr` is pointing one element past the buffer, so it doesn't overlap with `initialized`
49010 // Write all elements except the last one
49221 /// Creates a consuming iterator, that is, one that moves each value out of