@@ -534,9 +534,9 @@ where
534534 /// Return `true` if an equivalent to `key` exists in the map.
535535 ///
536536 /// Computes in **O(1)** time (average).
537- pub fn contains_key < Q : ? Sized > ( & self , key : & Q ) -> bool
537+ pub fn contains_key < Q > ( & self , key : & Q ) -> bool
538538 where
539- Q : Hash + Equivalent < K > ,
539+ Q : ? Sized + Hash + Equivalent < K > ,
540540 {
541541 self . get_index_of ( key) . is_some ( )
542542 }
@@ -545,9 +545,9 @@ where
545545 /// else `None`.
546546 ///
547547 /// Computes in **O(1)** time (average).
548- pub fn get < Q : ? Sized > ( & self , key : & Q ) -> Option < & V >
548+ pub fn get < Q > ( & self , key : & Q ) -> Option < & V >
549549 where
550- Q : Hash + Equivalent < K > ,
550+ Q : ? Sized + Hash + Equivalent < K > ,
551551 {
552552 if let Some ( i) = self . get_index_of ( key) {
553553 let entry = & self . as_entries ( ) [ i] ;
@@ -561,9 +561,9 @@ where
561561 /// if it is present, else `None`.
562562 ///
563563 /// Computes in **O(1)** time (average).
564- pub fn get_key_value < Q : ? Sized > ( & self , key : & Q ) -> Option < ( & K , & V ) >
564+ pub fn get_key_value < Q > ( & self , key : & Q ) -> Option < ( & K , & V ) >
565565 where
566- Q : Hash + Equivalent < K > ,
566+ Q : ? Sized + Hash + Equivalent < K > ,
567567 {
568568 if let Some ( i) = self . get_index_of ( key) {
569569 let entry = & self . as_entries ( ) [ i] ;
@@ -574,9 +574,9 @@ where
574574 }
575575
576576 /// Return item index, key and value
577- pub fn get_full < Q : ? Sized > ( & self , key : & Q ) -> Option < ( usize , & K , & V ) >
577+ pub fn get_full < Q > ( & self , key : & Q ) -> Option < ( usize , & K , & V ) >
578578 where
579- Q : Hash + Equivalent < K > ,
579+ Q : ? Sized + Hash + Equivalent < K > ,
580580 {
581581 if let Some ( i) = self . get_index_of ( key) {
582582 let entry = & self . as_entries ( ) [ i] ;
@@ -589,9 +589,9 @@ where
589589 /// Return item index, if it exists in the map
590590 ///
591591 /// Computes in **O(1)** time (average).
592- pub fn get_index_of < Q : ? Sized > ( & self , key : & Q ) -> Option < usize >
592+ pub fn get_index_of < Q > ( & self , key : & Q ) -> Option < usize >
593593 where
594- Q : Hash + Equivalent < K > ,
594+ Q : ? Sized + Hash + Equivalent < K > ,
595595 {
596596 match self . as_entries ( ) {
597597 [ ] => None ,
@@ -603,9 +603,9 @@ where
603603 }
604604 }
605605
606- pub fn get_mut < Q : ? Sized > ( & mut self , key : & Q ) -> Option < & mut V >
606+ pub fn get_mut < Q > ( & mut self , key : & Q ) -> Option < & mut V >
607607 where
608- Q : Hash + Equivalent < K > ,
608+ Q : ? Sized + Hash + Equivalent < K > ,
609609 {
610610 if let Some ( i) = self . get_index_of ( key) {
611611 let entry = & mut self . as_entries_mut ( ) [ i] ;
@@ -615,9 +615,9 @@ where
615615 }
616616 }
617617
618- pub fn get_full_mut < Q : ? Sized > ( & mut self , key : & Q ) -> Option < ( usize , & K , & mut V ) >
618+ pub fn get_full_mut < Q > ( & mut self , key : & Q ) -> Option < ( usize , & K , & mut V ) >
619619 where
620- Q : Hash + Equivalent < K > ,
620+ Q : ? Sized + Hash + Equivalent < K > ,
621621 {
622622 if let Some ( i) = self . get_index_of ( key) {
623623 let entry = & mut self . as_entries_mut ( ) [ i] ;
@@ -636,9 +636,9 @@ where
636636 /// [`.shift_remove(key)`][Self::shift_remove] instead.
637637 #[ deprecated( note = "`remove` disrupts the map order -- \
638638 use `swap_remove` or `shift_remove` for explicit behavior.") ]
639- pub fn remove < Q : ? Sized > ( & mut self , key : & Q ) -> Option < V >
639+ pub fn remove < Q > ( & mut self , key : & Q ) -> Option < V >
640640 where
641- Q : Hash + Equivalent < K > ,
641+ Q : ? Sized + Hash + Equivalent < K > ,
642642 {
643643 self . swap_remove ( key)
644644 }
@@ -651,9 +651,9 @@ where
651651 /// use [`.shift_remove_entry(key)`][Self::shift_remove_entry] instead.
652652 #[ deprecated( note = "`remove_entry` disrupts the map order -- \
653653 use `swap_remove_entry` or `shift_remove_entry` for explicit behavior.") ]
654- pub fn remove_entry < Q : ? Sized > ( & mut self , key : & Q ) -> Option < ( K , V ) >
654+ pub fn remove_entry < Q > ( & mut self , key : & Q ) -> Option < ( K , V ) >
655655 where
656- Q : Hash + Equivalent < K > ,
656+ Q : ? Sized + Hash + Equivalent < K > ,
657657 {
658658 self . swap_remove_entry ( key)
659659 }
@@ -668,9 +668,9 @@ where
668668 /// Return `None` if `key` is not in map.
669669 ///
670670 /// Computes in **O(1)** time (average).
671- pub fn swap_remove < Q : ? Sized > ( & mut self , key : & Q ) -> Option < V >
671+ pub fn swap_remove < Q > ( & mut self , key : & Q ) -> Option < V >
672672 where
673- Q : Hash + Equivalent < K > ,
673+ Q : ? Sized + Hash + Equivalent < K > ,
674674 {
675675 self . swap_remove_full ( key) . map ( third)
676676 }
@@ -684,9 +684,9 @@ where
684684 /// Return `None` if `key` is not in map.
685685 ///
686686 /// Computes in **O(1)** time (average).
687- pub fn swap_remove_entry < Q : ? Sized > ( & mut self , key : & Q ) -> Option < ( K , V ) >
687+ pub fn swap_remove_entry < Q > ( & mut self , key : & Q ) -> Option < ( K , V ) >
688688 where
689- Q : Hash + Equivalent < K > ,
689+ Q : ? Sized + Hash + Equivalent < K > ,
690690 {
691691 match self . swap_remove_full ( key) {
692692 Some ( ( _, key, value) ) => Some ( ( key, value) ) ,
@@ -704,9 +704,9 @@ where
704704 /// Return `None` if `key` is not in map.
705705 ///
706706 /// Computes in **O(1)** time (average).
707- pub fn swap_remove_full < Q : ? Sized > ( & mut self , key : & Q ) -> Option < ( usize , K , V ) >
707+ pub fn swap_remove_full < Q > ( & mut self , key : & Q ) -> Option < ( usize , K , V ) >
708708 where
709- Q : Hash + Equivalent < K > ,
709+ Q : ? Sized + Hash + Equivalent < K > ,
710710 {
711711 match self . as_entries ( ) {
712712 [ x] if key. equivalent ( & x. key ) => {
@@ -731,9 +731,9 @@ where
731731 /// Return `None` if `key` is not in map.
732732 ///
733733 /// Computes in **O(n)** time (average).
734- pub fn shift_remove < Q : ? Sized > ( & mut self , key : & Q ) -> Option < V >
734+ pub fn shift_remove < Q > ( & mut self , key : & Q ) -> Option < V >
735735 where
736- Q : Hash + Equivalent < K > ,
736+ Q : ? Sized + Hash + Equivalent < K > ,
737737 {
738738 self . shift_remove_full ( key) . map ( third)
739739 }
@@ -747,9 +747,9 @@ where
747747 /// Return `None` if `key` is not in map.
748748 ///
749749 /// Computes in **O(n)** time (average).
750- pub fn shift_remove_entry < Q : ? Sized > ( & mut self , key : & Q ) -> Option < ( K , V ) >
750+ pub fn shift_remove_entry < Q > ( & mut self , key : & Q ) -> Option < ( K , V ) >
751751 where
752- Q : Hash + Equivalent < K > ,
752+ Q : ? Sized + Hash + Equivalent < K > ,
753753 {
754754 match self . shift_remove_full ( key) {
755755 Some ( ( _, key, value) ) => Some ( ( key, value) ) ,
@@ -767,9 +767,9 @@ where
767767 /// Return `None` if `key` is not in map.
768768 ///
769769 /// Computes in **O(n)** time (average).
770- pub fn shift_remove_full < Q : ? Sized > ( & mut self , key : & Q ) -> Option < ( usize , K , V ) >
770+ pub fn shift_remove_full < Q > ( & mut self , key : & Q ) -> Option < ( usize , K , V ) >
771771 where
772- Q : Hash + Equivalent < K > ,
772+ Q : ? Sized + Hash + Equivalent < K > ,
773773 {
774774 match self . as_entries ( ) {
775775 [ x] if key. equivalent ( & x. key ) => {
0 commit comments