Skip to content

Commit b960b3a

Browse files
nikicmbrubeck
authored andcommitted
Mark Array::size() as inline
1 parent e01054b commit b960b3a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -2089,6 +2089,7 @@ impl<T, const N: usize> SmallVec<[T; N]> {
20892089
#[cfg_attr(docsrs, doc(cfg(feature = "const_generics")))]
20902090
unsafe impl<T, const N: usize> Array for [T; N] {
20912091
type Item = T;
2092+
#[inline]
20922093
fn size() -> usize {
20932094
N
20942095
}
@@ -2100,6 +2101,7 @@ macro_rules! impl_array(
21002101
$(
21012102
unsafe impl<T> Array for [T; $size] {
21022103
type Item = T;
2104+
#[inline]
21032105
fn size() -> usize { $size }
21042106
}
21052107
)+

0 commit comments

Comments
 (0)