@@ -134,7 +134,7 @@ impl<A: Array> ArrayVec<A> {
134134 /// let array = ArrayVec::from([1, 2, 3]);
135135 /// assert_eq!(array.capacity(), 3);
136136 /// ```
137- #[ inline]
137+ #[ inline( always ) ]
138138 pub fn capacity ( & self ) -> usize { A :: CAPACITY }
139139
140140 /// Return if the `ArrayVec` is completely filled.
@@ -235,7 +235,6 @@ impl<A: Array> ArrayVec<A> {
235235 ///
236236 /// assert_eq!(&array[..], &[1, 2]);
237237 /// ```
238- #[ inline]
239238 pub unsafe fn push_unchecked ( & mut self , element : A :: Item ) {
240239 let len = self . len ( ) ;
241240 debug_assert ! ( len < A :: CAPACITY ) ;
@@ -507,7 +506,6 @@ impl<A: Array> ArrayVec<A> {
507506 ///
508507 /// This method uses *debug assertions* to check that `length` is
509508 /// not greater than the capacity.
510- #[ inline]
511509 pub unsafe fn set_len ( & mut self , length : usize ) {
512510 debug_assert ! ( length <= self . capacity( ) ) ;
513511 self . len = Index :: from ( length) ;
@@ -755,7 +753,6 @@ pub struct IntoIter<A: Array> {
755753impl < A : Array > Iterator for IntoIter < A > {
756754 type Item = A :: Item ;
757755
758- #[ inline]
759756 fn next ( & mut self ) -> Option < A :: Item > {
760757 if self . index == self . v . len {
761758 None
@@ -775,7 +772,6 @@ impl<A: Array> Iterator for IntoIter<A> {
775772}
776773
777774impl < A : Array > DoubleEndedIterator for IntoIter < A > {
778- #[ inline]
779775 fn next_back ( & mut self ) -> Option < A :: Item > {
780776 if self . index == self . v . len {
781777 None
@@ -852,7 +848,6 @@ impl<'a, A: Array> Iterator for Drain<'a, A>
852848{
853849 type Item = A :: Item ;
854850
855- #[ inline]
856851 fn next ( & mut self ) -> Option < Self :: Item > {
857852 self . iter . next ( ) . map ( |elt|
858853 unsafe {
@@ -861,7 +856,6 @@ impl<'a, A: Array> Iterator for Drain<'a, A>
861856 )
862857 }
863858
864- #[ inline]
865859 fn size_hint ( & self ) -> ( usize , Option < usize > ) {
866860 self . iter . size_hint ( )
867861 }
@@ -870,7 +864,6 @@ impl<'a, A: Array> Iterator for Drain<'a, A>
870864impl < ' a , A : Array > DoubleEndedIterator for Drain < ' a , A >
871865 where A :: Item : ' a ,
872866{
873- #[ inline]
874867 fn next_back ( & mut self ) -> Option < Self :: Item > {
875868 self . iter . next_back ( ) . map ( |elt|
876869 unsafe {
@@ -1069,27 +1062,22 @@ impl<A: Array> Default for ArrayVec<A> {
10691062}
10701063
10711064impl < A : Array > PartialOrd for ArrayVec < A > where A :: Item : PartialOrd {
1072- #[ inline]
10731065 fn partial_cmp ( & self , other : & ArrayVec < A > ) -> Option < cmp:: Ordering > {
10741066 ( * * self ) . partial_cmp ( other)
10751067 }
10761068
1077- #[ inline]
10781069 fn lt ( & self , other : & Self ) -> bool {
10791070 ( * * self ) . lt ( other)
10801071 }
10811072
1082- #[ inline]
10831073 fn le ( & self , other : & Self ) -> bool {
10841074 ( * * self ) . le ( other)
10851075 }
10861076
1087- #[ inline]
10881077 fn ge ( & self , other : & Self ) -> bool {
10891078 ( * * self ) . ge ( other)
10901079 }
10911080
1092- #[ inline]
10931081 fn gt ( & self , other : & Self ) -> bool {
10941082 ( * * self ) . gt ( other)
10951083 }
0 commit comments