From 72beb7ad074426dd20b742476894064a77041619 Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Tue, 17 Sep 2024 10:02:22 +0200 Subject: [PATCH] Make ravel functions private again --- pineappl/src/packed_array.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pineappl/src/packed_array.rs b/pineappl/src/packed_array.rs index 4b5ec6fb..ba28f4dd 100644 --- a/pineappl/src/packed_array.rs +++ b/pineappl/src/packed_array.rs @@ -159,7 +159,7 @@ impl PackedArray { } /// Converts a `multi_index` into a flat index. -pub fn ravel_multi_index(multi_index: &[usize], shape: &[usize]) -> usize { +fn ravel_multi_index(multi_index: &[usize], shape: &[usize]) -> usize { assert_eq!(multi_index.len(), shape.len()); multi_index @@ -174,7 +174,7 @@ pub fn ravel_multi_index(multi_index: &[usize], shape: &[usize]) -> usize { /// /// Panics when `index` is out of range. #[must_use] -pub fn unravel_index(mut index: usize, shape: &[usize]) -> [usize; D] { +fn unravel_index(mut index: usize, shape: &[usize]) -> [usize; D] { assert!(index < shape.iter().product()); let mut indices = [0; D]; for (i, d) in indices.iter_mut().zip(shape).rev() {