Skip to content

Commit 88bfbb0

Browse files
committed
Mark trait methods inline
1 parent b9bf9ef commit 88bfbb0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

crates/core_simd/src/macros.rs

+6
Original file line numberDiff line numberDiff line change
@@ -141,24 +141,28 @@ macro_rules! base_vector_traits {
141141
impl Copy for $name {}
142142

143143
impl Clone for $name {
144+
#[inline]
144145
fn clone(&self) -> Self {
145146
*self
146147
}
147148
}
148149

149150
impl Default for $name {
151+
#[inline]
150152
fn default() -> Self {
151153
Self::splat(<$type>::default())
152154
}
153155
}
154156

155157
impl PartialEq for $name {
158+
#[inline]
156159
fn eq(&self, other: &Self) -> bool {
157160
AsRef::<[$type]>::as_ref(self) == AsRef::<[$type]>::as_ref(other)
158161
}
159162
}
160163

161164
impl PartialOrd for $name {
165+
#[inline]
162166
fn partial_cmp(&self, other: &Self) -> Option<core::cmp::Ordering> {
163167
AsRef::<[$type]>::as_ref(self).partial_cmp(AsRef::<[$type]>::as_ref(other))
164168
}
@@ -213,12 +217,14 @@ macro_rules! integer_vector_traits {
213217
impl Eq for $name {}
214218

215219
impl Ord for $name {
220+
#[inline]
216221
fn cmp(&self, other: &Self) -> core::cmp::Ordering {
217222
AsRef::<[$type]>::as_ref(self).cmp(AsRef::<[$type]>::as_ref(other))
218223
}
219224
}
220225

221226
impl core::hash::Hash for $name {
227+
#[inline]
222228
fn hash<H>(&self, state: &mut H)
223229
where
224230
H: core::hash::Hasher

0 commit comments

Comments
 (0)