Explorar el Código

traits: inline Saturating methods

Josh Stone hace 8 años
padre
commit
fa451ac00c
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      traits/src/ops/saturating.rs

+ 2 - 0
traits/src/ops/saturating.rs

@@ -12,10 +12,12 @@ pub trait Saturating {
 macro_rules! saturating_impl {
     ($trait_name:ident for $($t:ty)*) => {$(
         impl $trait_name for $t {
+            #[inline]
             fn saturating_add(self, v: Self) -> Self {
                 Self::saturating_add(self, v)
             }
 
+            #[inline]
             fn saturating_sub(self, v: Self) -> Self {
                 Self::saturating_sub(self, v)
             }