Skip to content

Commit

Permalink
Add docs for internal function
Browse files Browse the repository at this point in the history
  • Loading branch information
alecandido committed May 15, 2023
1 parent 55614df commit aa59fc6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pineappl/src/grid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -937,9 +937,14 @@ impl Grid {
bins: &BinLimits,
entries: &[LumiEntry],
) -> (Vec<Order>, Vec<LumiEntry>) {
/// Extend collection with non-duplicated elements.
///
/// Notice that this function does not modify the order of elements.
fn unique<T: Clone + PartialEq>(current: &[T], update: &[T]) -> Vec<T> {
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()
Expand Down

0 comments on commit aa59fc6

Please sign in to comment.