Lines Matching refs:get
1371 let t = map.get(&keys[i]);
1394 let x = map.get(&i);
3408 // Clone a bit and let these get dropped.
3431 // Clone a bit and let these get dropped.
3672 let state = self.state.get();
3832 assert_eq!(s.get($range), Some(expected), "(in assertion for: get)");
3886 // and `None` test cases for get/get_mut.
3915 assert_eq!(v.get($bad), None, "(in None assertion for get)");
4120 // so that `get` doesn't simply return None for the wrong reason.
6215 Bound::Included(if self.0.get() {
6241 Bound::Excluded(if self.0.get() {
6304 // * overflow may trigger when multiplying `new_cap` by size_of::<T> (to get bytes)
7983 // * overflow may trigger when multiplying `new_cap` by size_of::<T> (to get bytes)
8783 // these elements get deduplicated
9161 // Clone a bit and let these get dropped.
9184 // Clone a bit and let these get dropped.
9338 assert_eq!(a.get(1), None);
9340 assert_eq!(a.get(1).unwrap(), &12);
9342 assert_eq!(a.get(1).unwrap(), &12);
10899 self.version.set(self.version.get() + 1);
10900 other.version.set(other.version.get() + 1);
10915 VERSIONS.fetch_sub(self.version.get(), Relaxed);
10973 if !SILENCE_PANIC.with(|s| s.get()) {
12012 assert_eq!(ring.get(0), Some(&0));
12013 assert_eq!(ring.get(1), None);
12016 assert_eq!(ring.get(0), Some(&0));
12017 assert_eq!(ring.get(1), Some(&1));
12018 assert_eq!(ring.get(2), None);
12021 assert_eq!(ring.get(0), Some(&0));
12022 assert_eq!(ring.get(1), Some(&1));
12023 assert_eq!(ring.get(2), Some(&2));
12024 assert_eq!(ring.get(3), None);
12027 assert_eq!(ring.get(0), Some(&1));
12028 assert_eq!(ring.get(1), Some(&2));
12029 assert_eq!(ring.get(2), None);
12032 assert_eq!(ring.get(0), Some(&2));
12033 assert_eq!(ring.get(1), None);
12036 assert_eq!(ring.get(0), None);
12037 assert_eq!(ring.get(1), None);
12362 // * overflow may trigger when multiplying `new_cap` by size_of::<T> (to get bytes)
13165 // Test that pointers don't get truncated.
13829 assert_eq!(x.get(), 1000);
14498 /// *not* get a `RawVec` with the requested capacity.
14674 // checks to get our current layout.
14686 /// reallocate enough space plus comfortable slack space to get amortized
15919 // But we still need to be able to get the alloc layout to drop.
16466 /// an analogue to `FromUtf8Error`, and you can get one from a `FromUtf8Error`
17879 /// Fetch a `Utf8Error` to get more details about the conversion failure.
18408 /// [`Display`] should be implemented instead, and you get the `ToString`
19642 //! a memory leak. In order to get around this, we can use [`Weak`]
19898 let prev_value = (*inner).strong.get();
21574 /// This can be used to safely get a strong reference (by calling [`upgrade`]
21625 // Thus, we reverse the offset to get the whole RcBox.
21863 self.strong_ref().get()
21887 self.weak_ref().get()
22650 /// Without it, we get this error:
22841 // If `is_less` panics at any point during the process, `hole` will get dropped and
22902 // If `is_less` panics at any point during the process, `hole` will get dropped and fill the
23004 // Slices of up to this length get sorted using insertion sort.
23016 // Short arrays get sorted in-place via insertion sort to avoid allocations.
23449 // Note that we **do not** run these tests here. The windows builders get super
24986 /// This can be used to safely get a strong reference (by calling [`upgrade`]
25037 // Thus, we reverse the offset to get the whole RcBox.
25845 //! Things can get a little tricky once you start intermingling the two types of
26716 // But we still need to be able to get the alloc layout to drop.
27950 // Need an unbound lifetime to get 'a
27978 // Need an unbound lifetime to get 'a
28004 // Need an unbound lifetime to get 'a
28032 // Need an unbound lifetime to get 'a
29484 self.flipped.set(!self.flipped.get());
29504 if self.1.flipped.get() { ord.reverse() } else { ord }
29889 /// match movie_reviews.get(movie) {
30033 fn get(&self, key: &Q) -> Option<&K> {
30322 /// assert_eq!(map.get(&1), Some(&"a"));
30323 /// assert_eq!(map.get(&2), None);
30326 pub fn get<Q: ?Sized>(&self, key: &Q) -> Option<&V>
30409 /// assert_eq!(*map.get(&1).unwrap(), "first");
30410 /// assert_eq!(*map.get(&2).unwrap(), "b");
30492 /// assert_eq!(*map.get(&1).unwrap(), "a");
30493 /// assert_eq!(*map.get(&2).unwrap(), "last");
30556 self.get(key).is_some()
30578 // See `get` for implementation notes, this is basically a copy-paste with mut's added
30652 /// assert_eq!(err.entry.get(), &"a");
31820 self.get(key).expect("no entry found for key")
32667 /// assert_eq!(set.get(&2), Some(&2));
32668 /// assert_eq!(set.get(&4), None);
32671 pub fn get<Q: ?Sized>(&self, value: &Q) -> Option<&T>
32676 Recover::get(&self.map, value)
32949 /// assert_eq!(set.get(&[][..]).unwrap().capacity(), 0);
32951 /// assert_eq!(set.get(&[][..]).unwrap().capacity(), 10);
34280 fn get(&self, key: &Q) -> Option<&Self::Key>;
34798 assert_eq!(s.get(&Foo("a", 1)), Some(&Foo("a", 2)));
34802 assert_eq!(s.get(&Foo("a", 1)), None);
35115 f.debug_struct("OccupiedEntry").field("key", self.key()).field("value", self.get()).finish()
35135 .field("old_value", self.entry.get())
35149 self.entry.get(),
35415 /// // If now try to get the value, it will panic:
35435 /// assert_eq!(o.get(), &12);
35439 pub fn get(&self) -> &V {
35462 /// assert_eq!(*o.get(), 22);
35536 /// // If we try to get "poneyland"'s value, it'll panic:
35773 assert_eq!(map.get(&i).unwrap(), &(i * 10));
35777 assert_eq!(map.get(&i), None);
35786 assert_eq!(map.get(&i).unwrap(), &(i * 100));
35795 assert_eq!(map.get(&(2 * i)), None);
35796 assert_eq!(map.get(&(2 * i + 1)).unwrap(), &(i * 200 + 100));
35813 assert_eq!(map.get(&1), None);
35831 assert_eq!(map.get(&1), Some(&1));
35839 assert_eq!(map.get(&1), Some(&2));
35851 assert_eq!(map.get(&2), Some(&4));
35863 assert_eq!(map.get(&1), None);
35865 assert_eq!(map.get(&2), Some(&4));
35877 assert_eq!(map.get(&1), None);
36798 fn get<T: Ord>(v: &BTreeMap<Box<T>, ()>, t: &T) {
36799 v.get(t);
36853 assert_eq!(view.get(), &10);
36857 assert_eq!(map.get(&1).unwrap(), &100);
36868 assert_eq!(map.get(&2).unwrap(), &200);
36879 assert_eq!(map.get(&3), None);
36890 assert_eq!(map.get(&10).unwrap(), &1000);
38090 /// - We cannot get implicit coercion from say `Mut<'a>` to `Immut<'a>`.
40853 /// assert_eq!(buf.get(1), Some(&4));
40856 pub fn get(&self, index: usize) -> Option<&T> {
41650 self.get(0)
41694 self.get(self.len().wrapping_sub(1))
43086 self.get(index).expect("Out of bounds access")
43565 // can't guarantee we got 15, so have to get what we got.
43566 // 15 would be great, but we will definitely get 2^k - 1, for k >= 4, or else
43709 // can't guarantee we got 15, so have to get what we got.
43710 // 15 would be great, but we will definitely get 2^k - 1, for k >= 4, or else
43842 // can't guarantee we got 15, so have to get what we got.
43843 // 15 would be great, but we will definitely get 2^k - 1, for k >= 4, or else
43874 // can't guarantee we got 15, so have to get what we got.
43875 // 15 would be great, but we will definitely get 2^k - 1, for k >= 4, or else
44446 /// // there's no items in there yet so we get None.
44813 if hole.element() <= unsafe { hole.get(parent) } {
44844 child += unsafe { hole.get(child) <= hole.get(child + 1) } as usize;
44849 if hole.element() >= unsafe { hole.get(child) } {
44860 if child == end - 1 && hole.element() < unsafe { hole.get(child) } {
44902 child += unsafe { hole.get(child) <= hole.get(child + 1) } as usize;
45134 self.data.get(0)
45418 unsafe fn get(&self, index: usize) -> &T {
46458 // So we get better branch prediction.
46777 // - it lets us thread the write pointer through its innards and get it back in the end
47021 /// Use [`get`] and [`get_mut`] if you want to check whether the index is in
47027 /// To get a [slice][prim@slice], use [`&`]. Example:
47062 /// whenever possible to specify how big the vector is expected to get.
47166 /// [`get`]: ../../std/vec/struct.Vec.html#method.get
51891 if size > self.fuel.get() {
51896 self.fuel.set(self.fuel.get() - size);
51909 assert_eq!(v.alloc.fuel.get(), 450);
51911 assert_eq!(v.alloc.fuel.get(), 250);
52030 fn get(&self) -> u32;
52037 fn get(&self) -> u32 {
52049 assert_eq!(17, (*p).get());
52052 assert_eq!(19, y.get());