Skip to content

Commit 1796ca7

Browse files
committed
Add docs for internal function
1 parent 8f4aa90 commit 1796ca7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pineappl/src/grid.rs

+5
Original file line numberDiff line numberDiff line change
@@ -937,9 +937,14 @@ impl Grid {
937937
bins: &BinLimits,
938938
entries: &[LumiEntry],
939939
) -> (Vec<Order>, Vec<LumiEntry>) {
940+
/// Extend collection with non-duplicated elements.
941+
///
942+
/// Notice that this function does not modify the order of elements.
940943
fn unique<T: Clone + PartialEq>(current: &[T], update: &[T]) -> Vec<T> {
941944
let mut new = Vec::new();
942945

946+
// Since the order has to be preserved, this can't be achieved just by sorting and
947+
// deduplicating.
943948
for el in update.iter() {
944949
if !current
945950
.iter()

0 commit comments

Comments
 (0)