We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8f4aa90 commit 1796ca7Copy full SHA for 1796ca7
pineappl/src/grid.rs
@@ -937,9 +937,14 @@ impl Grid {
937
bins: &BinLimits,
938
entries: &[LumiEntry],
939
) -> (Vec<Order>, Vec<LumiEntry>) {
940
+ /// Extend collection with non-duplicated elements.
941
+ ///
942
+ /// Notice that this function does not modify the order of elements.
943
fn unique<T: Clone + PartialEq>(current: &[T], update: &[T]) -> Vec<T> {
944
let mut new = Vec::new();
945
946
+ // Since the order has to be preserved, this can't be achieved just by sorting and
947
+ // deduplicating.
948
for el in update.iter() {
949
if !current
950
.iter()
0 commit comments