From 1796ca709ff462ecadbada24b1e6fce5b6f10358 Mon Sep 17 00:00:00 2001 From: Alessandro Candido Date: Mon, 15 May 2023 18:10:15 +0200 Subject: [PATCH] Add docs for internal function --- pineappl/src/grid.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pineappl/src/grid.rs b/pineappl/src/grid.rs index 0224c30c..bcb4b076 100644 --- a/pineappl/src/grid.rs +++ b/pineappl/src/grid.rs @@ -937,9 +937,14 @@ impl Grid { bins: &BinLimits, entries: &[LumiEntry], ) -> (Vec, Vec) { + /// Extend collection with non-duplicated elements. + /// + /// Notice that this function does not modify the order of elements. fn unique(current: &[T], update: &[T]) -> Vec { let mut new = Vec::new(); + // Since the order has to be preserved, this can't be achieved just by sorting and + // deduplicating. for el in update.iter() { if !current .iter()