Slightly optimize viewable stream

This commit is contained in:
themode 2022-02-13 20:02:06 +01:00
parent ab2fee2bac
commit 056f819cc8

View File

@ -227,11 +227,11 @@ public final class ViewEngine {
Stream<T> sharedInstanceStream = shared.stream().<List<T>>mapMulti((inst, consumer) -> {
var ref = inst.getEntityTracker().references(lastPoint, range, target);
ref.forEach(consumer);
}).flatMap(Collection::stream);
}).flatMap(Collection::stream).distinct();
result = Stream.concat(result, sharedInstanceStream);
}
}
return result.distinct();
return result;
}
}