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()