From 88bfbb001e291ba97b3b6d6cea3456bbd4fbf640 Mon Sep 17 00:00:00 2001 From: Caleb Zulawski Date: Sat, 26 Sep 2020 14:41:01 -0400 Subject: [PATCH] Mark trait methods inline --- crates/core_simd/src/macros.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crates/core_simd/src/macros.rs b/crates/core_simd/src/macros.rs index 165029cca5e..2f93db19035 100644 --- a/crates/core_simd/src/macros.rs +++ b/crates/core_simd/src/macros.rs @@ -141,24 +141,28 @@ macro_rules! base_vector_traits { impl Copy for $name {} impl Clone for $name { + #[inline] fn clone(&self) -> Self { *self } } impl Default for $name { + #[inline] fn default() -> Self { Self::splat(<$type>::default()) } } impl PartialEq for $name { + #[inline] fn eq(&self, other: &Self) -> bool { AsRef::<[$type]>::as_ref(self) == AsRef::<[$type]>::as_ref(other) } } impl PartialOrd for $name { + #[inline] fn partial_cmp(&self, other: &Self) -> Option { AsRef::<[$type]>::as_ref(self).partial_cmp(AsRef::<[$type]>::as_ref(other)) } @@ -213,12 +217,14 @@ macro_rules! integer_vector_traits { impl Eq for $name {} impl Ord for $name { + #[inline] fn cmp(&self, other: &Self) -> core::cmp::Ordering { AsRef::<[$type]>::as_ref(self).cmp(AsRef::<[$type]>::as_ref(other)) } } impl core::hash::Hash for $name { + #[inline] fn hash(&self, state: &mut H) where H: core::hash::Hasher