@@ -134,7 +134,7 @@ impl<A: Array> ArrayVec<A> {
134
134
/// let array = ArrayVec::from([1, 2, 3]);
135
135
/// assert_eq!(array.capacity(), 3);
136
136
/// ```
137
- #[ inline]
137
+ #[ inline( always ) ]
138
138
pub fn capacity ( & self ) -> usize { A :: CAPACITY }
139
139
140
140
/// Return if the `ArrayVec` is completely filled.
@@ -235,7 +235,6 @@ impl<A: Array> ArrayVec<A> {
235
235
///
236
236
/// assert_eq!(&array[..], &[1, 2]);
237
237
/// ```
238
- #[ inline]
239
238
pub unsafe fn push_unchecked ( & mut self , element : A :: Item ) {
240
239
let len = self . len ( ) ;
241
240
debug_assert ! ( len < A :: CAPACITY ) ;
@@ -507,7 +506,6 @@ impl<A: Array> ArrayVec<A> {
507
506
///
508
507
/// This method uses *debug assertions* to check that `length` is
509
508
/// not greater than the capacity.
510
- #[ inline]
511
509
pub unsafe fn set_len ( & mut self , length : usize ) {
512
510
debug_assert ! ( length <= self . capacity( ) ) ;
513
511
self . len = Index :: from ( length) ;
@@ -755,7 +753,6 @@ pub struct IntoIter<A: Array> {
755
753
impl < A : Array > Iterator for IntoIter < A > {
756
754
type Item = A :: Item ;
757
755
758
- #[ inline]
759
756
fn next ( & mut self ) -> Option < A :: Item > {
760
757
if self . index == self . v . len {
761
758
None
@@ -775,7 +772,6 @@ impl<A: Array> Iterator for IntoIter<A> {
775
772
}
776
773
777
774
impl < A : Array > DoubleEndedIterator for IntoIter < A > {
778
- #[ inline]
779
775
fn next_back ( & mut self ) -> Option < A :: Item > {
780
776
if self . index == self . v . len {
781
777
None
@@ -852,7 +848,6 @@ impl<'a, A: Array> Iterator for Drain<'a, A>
852
848
{
853
849
type Item = A :: Item ;
854
850
855
- #[ inline]
856
851
fn next ( & mut self ) -> Option < Self :: Item > {
857
852
self . iter . next ( ) . map ( |elt|
858
853
unsafe {
@@ -861,7 +856,6 @@ impl<'a, A: Array> Iterator for Drain<'a, A>
861
856
)
862
857
}
863
858
864
- #[ inline]
865
859
fn size_hint ( & self ) -> ( usize , Option < usize > ) {
866
860
self . iter . size_hint ( )
867
861
}
@@ -870,7 +864,6 @@ impl<'a, A: Array> Iterator for Drain<'a, A>
870
864
impl < ' a , A : Array > DoubleEndedIterator for Drain < ' a , A >
871
865
where A :: Item : ' a ,
872
866
{
873
- #[ inline]
874
867
fn next_back ( & mut self ) -> Option < Self :: Item > {
875
868
self . iter . next_back ( ) . map ( |elt|
876
869
unsafe {
@@ -1069,27 +1062,22 @@ impl<A: Array> Default for ArrayVec<A> {
1069
1062
}
1070
1063
1071
1064
impl < A : Array > PartialOrd for ArrayVec < A > where A :: Item : PartialOrd {
1072
- #[ inline]
1073
1065
fn partial_cmp ( & self , other : & ArrayVec < A > ) -> Option < cmp:: Ordering > {
1074
1066
( * * self ) . partial_cmp ( other)
1075
1067
}
1076
1068
1077
- #[ inline]
1078
1069
fn lt ( & self , other : & Self ) -> bool {
1079
1070
( * * self ) . lt ( other)
1080
1071
}
1081
1072
1082
- #[ inline]
1083
1073
fn le ( & self , other : & Self ) -> bool {
1084
1074
( * * self ) . le ( other)
1085
1075
}
1086
1076
1087
- #[ inline]
1088
1077
fn ge ( & self , other : & Self ) -> bool {
1089
1078
( * * self ) . ge ( other)
1090
1079
}
1091
1080
1092
- #[ inline]
1093
1081
fn gt ( & self , other : & Self ) -> bool {
1094
1082
( * * self ) . gt ( other)
1095
1083
}
0 commit comments