mirror of
https://github.com/openharmony/third_party_rust_rust-smallvec.git
synced 2026-06-30 21:28:00 -04:00
Mark Array::size() as inline
This commit is contained in:
committed by
Matt Brubeck
parent
2611410d8b
commit
3160cafccf
@@ -2089,6 +2089,7 @@ impl<T, const N: usize> SmallVec<[T; N]> {
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "const_generics")))]
|
||||
unsafe impl<T, const N: usize> Array for [T; N] {
|
||||
type Item = T;
|
||||
#[inline]
|
||||
fn size() -> usize {
|
||||
N
|
||||
}
|
||||
@@ -2100,6 +2101,7 @@ macro_rules! impl_array(
|
||||
$(
|
||||
unsafe impl<T> Array for [T; $size] {
|
||||
type Item = T;
|
||||
#[inline]
|
||||
fn size() -> usize { $size }
|
||||
}
|
||||
)+
|
||||
|
||||
Reference in New Issue
Block a user