stream_data: Use yield*.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2023-08-02 17:57:28 -07:00 committed by Anders Kaseorg
parent 8df9828ed1
commit 6632eca2dc
2 changed files with 3 additions and 11 deletions

View File

@ -53,12 +53,8 @@ class BinaryDict {
}
*values() {
for (const value of this.trues.values()) {
yield value;
}
for (const value of this.falses.values()) {
yield value;
}
yield* this.trues.values();
yield* this.falses.values();
}
get(k) {

View File

@ -266,11 +266,7 @@ function FakeElement(selector, opts) {
f.call(child);
}
};
$self[Symbol.iterator] = function* () {
for (const child of opts.children) {
yield child;
}
};
$self[Symbol.iterator] = () => opts.children.values();
for (const [i, child] of opts.children.entries()) {
$self[i] = child;