From be8abfca2865eb6a848aba7723daa544cb7315b3 Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Mon, 23 May 2022 10:11:59 -0400 Subject: [PATCH] inline SteppedVector::get_index --- src/misc.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/misc.rs b/src/misc.rs index 115c761..a0deefe 100644 --- a/src/misc.rs +++ b/src/misc.rs @@ -20,6 +20,7 @@ pub struct SteppedVector<'a> { impl<'a> SteppedVector<'a> { /// Returns `Option` with index of element with value `x`. and `None` if `x` does not exist in `data` + #[inline] pub fn get_index(&self, x: f64) -> Option { debug_assert!(!x.is_nan()); debug_assert!(self.step > 0.0);