Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion quest/m2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ The fork's feature quests folded into the [exporter](/quest/m1/ffi-export.md);
- [Drop in the TypeScript translator](/quest/m2/ts-drop.md) - every value that drops in moq-net and kio drops where Rust drops it
- [Async in the TypeScript translator](/quest/m2/ts-async.md) - moq-net's and kio's async code translates with Rust's lazy futures
- [Shared ownership](/quest/m2/ts-shared.md) - `Arc`/`Rc`/`Weak` keep exact counts, and locks and atomics become plain values
- [Copy by type](/quest/m2/ts-copy.md) - copying a `Copy` aggregate shares its references instead of deep-copying them
- [Translate char and vec![x]](/quest/m2/ts-char-vec.md) - `char` values and `vec![x]` translate, unblocking moq-net's refused sites
- [Firefox in the TS benchmark](/quest/m2/ts-bench-firefox.md) - SpiderMonkey joins Chrome, Bun, and Node in `just ts bench`
- [Translate moq-net's model to TypeScript](/quest/m2/ts-model.md) - the driver grows from moq-net's codec to its model, for moq to compare against WASM
Expand Down
23 changes: 0 additions & 23 deletions quest/m2/ts-copy.md

This file was deleted.

3 changes: 0 additions & 3 deletions quest/m2/ts-shared.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ is its own guard. Left: `Rc`, `weak_count` (a dropped `Weak` counts nothing yet)
panics. A re-entrant `Mutex` lock on one thread is unspecified in Rust; pick
a loud failure (panic) and document it.
- Measure the counter overhead on the [TS benchmark](/ts/README.md#bench).
- `rt.copy` copies a `Copy` aggregate deeply, through the shared references in it,
so copying `(&Arc<T>, u8)` copies the `Arc` and its count, or a `Cell` and its
value. Copy only what the type owns.

Public API: the translator's output for shared and interior-mutable types.

Expand Down
8 changes: 5 additions & 3 deletions ts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,11 @@ arguments. Types are translated once, generically, so a function of a generic ty
instance's, declaring the instance it takes as `self`:
`fmt$Debug_Pair(self: Wrap<Pair.Pair>, f: rt.Formatter)`. A type's module exports the
type by its own name, which a caller writes `Decoder.Decoder`, and a function whose name
and exports it as its own: `function new_` is `Decoder.new`. A `Copy` struct, tuple, or
array, or an `Option` or `Result` holding one, is copied where Rust copies it, since JS
would share the object.
and exports it as its own: `function new_` is `Decoder.new`. A `Copy` struct, enum, tuple,
or array, or an `Option`, `Result`, or `Poll` holding one, is copied where Rust copies
it, since JS would share the object: by a function of `lib.ts` made for its type, such
as `copy$Point`, which copies what it holds by value and shares what it holds by
reference.

A collection keeps Rust's key semantics. A hash map or set keeps a key that is a JS
number, string, or boolean in a JS `Map`, which compares those as Rust's `Eq` does, and
Expand Down
5 changes: 3 additions & 2 deletions ts/fixtures/codec/expected/coding/decode.Decoder.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Generated by rust2-ts. Do not edit.

import * as rt from "../rt.ts";
import { copy$Form } from "../lib.ts";
import * as DecodeError from "../coding/decode.DecodeError.ts";
import { read } from "../coding/varint.ts";
import type * as Form from "../coding/varint.Form.ts";
Expand Down Expand Up @@ -81,7 +82,7 @@ export function rest(self: Decoder): Uint8Array {
export function sub(self: Decoder, len: rt.usize): rt.Result<Decoder, DecodeError.DecodeError> {
const _4: rt.Result<Uint8Array, DecodeError.DecodeError> = slice(self, len);
if (_4.ok) {
return rt.Ok(new_(_4.value, self.form));
return rt.Ok(new_(_4.value, copy$Form(self.form)));
}
return _4;
}
Expand Down Expand Up @@ -128,7 +129,7 @@ export function bool(self: Decoder): rt.Result<boolean, DecodeError.DecodeError>
export function varint(self: Decoder): rt.Result<rt.u64, DecodeError.DecodeError> {
let _0!: rt.Result<rt.u64, DecodeError.DecodeError>;
const _13: Uint8Array = self.buf;
const _3: Form.Form = self.form;
const _3: Form.Form = copy$Form(self.form);
const _2: rt.Result<[rt.u64, Uint8Array], DecodeError.DecodeError> = read(_13, _3);
if (_2.ok) {
const value: rt.u64 = _2.value[0];
Expand Down
3 changes: 2 additions & 1 deletion ts/fixtures/codec/expected/coding/version.Versions.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Generated by rust2-ts. Do not edit.

import * as rt from "../rt.ts";
import { copy$Version } from "../lib.ts";
import type * as DecodeError from "../coding/decode.DecodeError.ts";
import * as Decoder from "../coding/decode.Decoder.ts";
import type * as EncodeError from "../coding/encode.EncodeError.ts";
Expand Down Expand Up @@ -93,7 +94,7 @@ export function encode$Encode_Version(self: Versions, w: Encoder.Encoder, versio
}

export function from$From_Versions(vs: Version.Version[]): Versions {
return { _0: rt.sliceToVec(vs) };
return { _0: vs.map(copy$Version) };
}

//# sourceMappingURL=version.Versions.ts.map
17 changes: 17 additions & 0 deletions ts/fixtures/codec/expected/lib.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Generated by rust2-ts. Do not edit.

import type * as Form from "./coding/varint.Form.ts";
import type * as Version from "./coding/version.Version.ts";

export function copy$Form(v: Form.Form): Form.Form {
if (v.tag === "LeadingOnes") {
return { tag: "LeadingOnes", seven: v.seven };
}
return v;
}

export function copy$Version(v: Version.Version): Version.Version {
return { _0: v._0 };
}

//# sourceMappingURL=lib.ts.map
21 changes: 11 additions & 10 deletions ts/fixtures/lang/expected/collections.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Generated by rust2-ts. Do not edit.

import * as rt from "./rt.ts";
import { copy$Clash, copy$Rank, copy$Tally, copy$u8_Tally } from "./lib.ts";
import * as Clash from "./collections.Clash.ts";
import * as Dir from "./collections.Dir.ts";
import * as Fussy from "./collections.Fussy.ts";
Expand Down Expand Up @@ -195,9 +196,9 @@ export function hashMaps(kind: rt.u8, data: Uint8Array, out: rt.ByteVec): void {
}
const key: Pair.Pair = { a: 9, b: 9 };
const local: Tally.Tally = { n: 7 };
rt.hashInsert(pairs, key, rt.copy(local));
rt.hashInsert(pairs, key, copy$Tally(local));
local.n = 8;
const before: Tally.Tally = rt.copy(rt.hashIndex(pairs, key));
const before: Tally.Tally = copy$Tally(rt.hashIndex(pairs, key));
const _246: Tally.Tally | undefined = rt.hashGet(pairs, key);
if (_246 !== undefined) {
_246.n = rt.u16Add(_246.n, 2);
Expand Down Expand Up @@ -244,7 +245,7 @@ export function hashMaps(kind: rt.u8, data: Uint8Array, out: rt.ByteVec): void {
return { n: rankByte(k9) as rt.u16 };
}).n & 0xff);
}
const copy: rt.HashMap<Rank.Rank, Tally.Tally> = rt.hashClone(ranks, undefined, rt.copy);
const copy: rt.HashMap<Rank.Rank, Tally.Tally> = rt.hashClone(ranks, copy$Rank, copy$Tally);
const _327: Tally.Tally | undefined = rt.hashGet(copy, { tag: "Low" } as Rank.Rank);
if (_327 !== undefined) {
_327.n = 119;
Expand All @@ -265,7 +266,7 @@ export function hashMaps(kind: rt.u8, data: Uint8Array, out: rt.ByteVec): void {
return [rt.u8Rem(b8, 8), { n: b8 as rt.u16 }] as [rt.u8, Tally.Tally];
});
const bytes: rt.HashMap<rt.u8, Tally.Tally> = rt.hashExtend(rt.hashNew() as rt.HashMap<rt.u8, Tally.Tally>, _348);
const copy2: rt.HashMap<rt.u8, Tally.Tally> = rt.hashClone(bytes, undefined, rt.copy);
const copy2: rt.HashMap<rt.u8, Tally.Tally> = rt.hashClone(bytes, undefined, copy$Tally);
const iter9: rt.Iter<Tally.Tally> = rt.hashValues(copy2);
while (true) {
const _356: Tally.Tally | rt.Done = iter9.next();
Expand Down Expand Up @@ -302,7 +303,7 @@ export function hashMaps(kind: rt.u8, data: Uint8Array, out: rt.ByteVec): void {
stamp(stamped);
rt.byteVecPush(out, rt.hashLen(stamped) & 0xff);
const extended: rt.HashMap<rt.u8, Tally.Tally> = rt.hashNew() as rt.HashMap<rt.u8, Tally.Tally>;
rt.hashExtend(extended, rt.iterMap(rt.hashIter(bytes), rt.copy));
rt.hashExtend(extended, rt.iterMap(rt.hashIter(bytes), copy$u8_Tally));
const iter12: rt.Iter<Tally.Tally> = rt.hashValues(extended);
while (true) {
const _409: Tally.Tally | rt.Done = iter12.next();
Expand All @@ -326,7 +327,7 @@ export function hashMaps(kind: rt.u8, data: Uint8Array, out: rt.ByteVec): void {
rt.byteVecPush(out, rt.u64Eq(_430({ _0: first }), _430({ _0: first ^ 240 })) ? 1 : 0);
const _448: [rt.Hasher, Tally.Tally] = [rt.hasher(), { n: first as rt.u16 }];
const h: rt.Hasher = _448[0];
const counted: Tally.Tally = rt.copy(_448[1]);
const counted: Tally.Tally = copy$Tally(_448[1]);
const _453: rt.Hasher = countedHasher(h, counted);
const _456: rt.u16 = counted.n;
rt.hashInt(_456, _453);
Expand All @@ -340,7 +341,7 @@ export function hashMaps(kind: rt.u8, data: Uint8Array, out: rt.ByteVec): void {
return true;
});
const _473: rt.Iter<[Rank.Rank, rt.u16]> = rt.iterMap(rt.hashIter(ranks), (_224: [Rank.Rank, Tally.Tally]): [Rank.Rank, rt.u16] => {
return [_224[0], _224[1].n] as [Rank.Rank, rt.u16];
return [copy$Rank(_224[0]), _224[1].n] as [Rank.Rank, rt.u16];
});
const iter14: rt.Iter<[Rank.Rank, rt.u16]> = rt.btreeIter(rt.btreeExtend(rt.btreeNew(Rank.cmp$Ord) as rt.BTreeMap<Rank.Rank, rt.u16>, _473, true));
while (true) {
Expand Down Expand Up @@ -430,7 +431,7 @@ export function hashMaps(kind: rt.u8, data: Uint8Array, out: rt.ByteVec): void {
return k8._0;
});
rt.iterExtendBytes(out, rt.btreeKeys(rt.btreeExtendKeys(rt.btreeNew(rt.cmp) as rt.BTreeSet<rt.u8>, _583, true)));
const copy3: rt.HashMap<Clash.Clash, Tally.Tally> = rt.hashClone(clashes, rt.copy, rt.copy);
const copy3: rt.HashMap<Clash.Clash, Tally.Tally> = rt.hashClone(clashes, copy$Clash, copy$Tally);
rt.byteVecPush(out, rt.hashLen(copy3) & 0xff);
rt.byteVecPush(out, rt.hashContains(copy3, { _0: 1 }) ? 1 : 0);
}
Expand Down Expand Up @@ -963,7 +964,7 @@ export function deques(data: Uint8Array, out: rt.ByteVec): void {
return { n: _2 as rt.u16 };
});
const tallies: rt.VecDeque<Tally.Tally> = rt.dequeExtend(rt.dequeNew() as rt.VecDeque<Tally.Tally>, _101);
const copy: rt.VecDeque<Tally.Tally> = rt.dequeClone(tallies, rt.copy);
const copy: rt.VecDeque<Tally.Tally> = rt.dequeClone(tallies, copy$Tally);
const _105: Tally.Tally | undefined = rt.dequeEnd(copy);
if (_105 !== undefined) {
_105.n = _105.n ^ 255;
Expand All @@ -975,7 +976,7 @@ export function deques(data: Uint8Array, out: rt.ByteVec): void {
return t2.n & 0xff;
}));
const _119: rt.Iter<Tally.Tally> = rt.dequeIter(tallies);
rt.dequeExtend(copy, rt.iterMap(_119, rt.copy));
rt.dequeExtend(copy, rt.iterMap(_119, copy$Tally));
const _121: Tally.Tally | undefined = rt.dequeEnd(copy, true);
if (_121 !== undefined) {
_121.n = _121.n ^ 255;
Expand Down
11 changes: 6 additions & 5 deletions ts/fixtures/lang/expected/fmt.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Generated by rust2-ts. Do not edit.

import * as rt from "./rt.ts";
import { copy$Pair } from "./lib.ts";
import * as Bare from "./fmt.Bare.ts";
import * as Braced from "./fmt.Braced.ts";
import * as Fails from "./fmt.Fails.ts";
Expand Down Expand Up @@ -211,7 +212,7 @@ export function nested(data: Uint8Array): Nested.Nested {
_22 = { tag: "Rect", corner: { x: 0, y: 0 }, width: at(3) as rt.u16, height: 9 } as Shape.Shape;
}
const _35: rt.ByteVec = rt.sliceToByteVec(rt.sliceRange(data, 0, rt.min(data.length, 4)));
const _40: Pair.Pair[] = rt.sliceToVec([{ _0: at(4), _1: -1 }, { _0: 2, _1: rt.i64Of(-9223372036854775808n) }]);
const _40: Pair.Pair[] = [{ _0: at(4), _1: -1 }, { _0: 2, _1: rt.i64Of(-9223372036854775808n) }].map(copy$Pair);
if (!(rt.u8Rem(at(5), 2) === 0)) {
_49 = undefined;
} else {
Expand Down Expand Up @@ -304,14 +305,14 @@ export function written(data: Uint8Array, out: rt.ByteVec): void {
const arg = ([{ _0: "pad" }] as [Padded.Padded])[0];
const args4: rt.Fmt[] = [(f: rt.Formatter) => Padded.fmt$Display(arg, f)];
put(out, rt.fmtFormat([args4[0], "|", rt.fmtSpec({ align: ">", width: 6 }, args4[0]), "|", rt.fmtSpec({ fill: "_", align: "^", width: 9 }, args4[0]), "|", rt.fmtSpec({ width: 30 }, args4[0]), "|"]));
[{ id: at(1), list: rt.sliceToVec([1, at(2) as rt.u16]) }, { id: 0, list: [] }] as [Manual.Manual, Manual.Manual];
const arg2 = { id: at(1), list: rt.sliceToVec([1, at(2) as rt.u16]) };
[{ id: at(1), list: [1, at(2) as rt.u16].slice() }, { id: 0, list: [] }] as [Manual.Manual, Manual.Manual];
const arg2 = { id: at(1), list: [1, at(2) as rt.u16].slice() };
const _66: rt.Fmt = (f: rt.Formatter) => Manual.fmt$Debug(arg2, f);
const arg3 = { id: 0, list: [] };
const args6: rt.Fmt[] = [_66, (f: rt.Formatter) => Manual.fmt$Debug(arg3, f)];
put(out, rt.fmtFormat([args6[0], " ", rt.fmtSpec({ alternate: true }, args6[0]), " ", args6[1]]));
[{ _0: rt.sliceToVec([{ _0: at(3), _1: 0 }, { _0: 1, _1: -1 }]) }, { _0: [] }] as [Seq.Seq, Seq.Seq];
const arg4 = { _0: rt.sliceToVec([{ _0: at(3), _1: 0 }, { _0: 1, _1: -1 }]) };
[{ _0: [{ _0: at(3), _1: 0 }, { _0: 1, _1: -1 }].map(copy$Pair) }, { _0: [] }] as [Seq.Seq, Seq.Seq];
const arg4 = { _0: [{ _0: at(3), _1: 0 }, { _0: 1, _1: -1 }].map(copy$Pair) };
const _92: rt.Fmt = (f: rt.Formatter) => Seq.fmt$Debug(arg4, f);
const arg5 = { _0: [] };
const args8: rt.Fmt[] = [_92, (f: rt.Formatter) => Seq.fmt$Debug(arg5, f)];
Expand Down
3 changes: 2 additions & 1 deletion ts/fixtures/lang/expected/generics.Either.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Generated by rust2-ts. Do not edit.

import * as rt from "./rt.ts";
import { copy$Point } from "./lib.ts";
import * as Point from "./shapes.Point.ts";

export function fmt$Debug_Point_u8(self: Either<Point.Point, rt.u8>, f: rt.Formatter): rt.Result<undefined, rt.FmtError> {
Expand Down Expand Up @@ -53,7 +54,7 @@ export type Either<L, R> = { tag: "Left"; _0: L } | { tag: "Right"; value: R } |

export function left$Point_u8(self: Either<Point.Point, rt.u8>): Point.Point | undefined {
if (self.tag === "Left") {
return rt.copy(self._0);
return copy$Point(self._0);
}
return undefined;
}
Expand Down
3 changes: 2 additions & 1 deletion ts/fixtures/lang/expected/generics.Tagged.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Generated by rust2-ts. Do not edit.

import * as rt from "./rt.ts";
import { copy$Option_Wrap_i16 } from "./lib.ts";
import * as Either from "./generics.Either.ts";
import * as Wrap from "./generics.Wrap.ts";

Expand Down Expand Up @@ -29,7 +30,7 @@ export class Tagged<K, V> {
}

export function first$Either_u8_u16_i16(self: Tagged<Either.Either<rt.u8, rt.u16>, rt.i16>): Wrap.Wrap<rt.i16> | undefined {
return rt.copy(rt.sliceFirst(self.all));
return copy$Option_Wrap_i16(rt.sliceFirst(self.all));
}

//# sourceMappingURL=generics.Tagged.ts.map
7 changes: 4 additions & 3 deletions ts/fixtures/lang/expected/generics.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Generated by rust2-ts. Do not edit.

import * as rt from "./rt.ts";
import { copy$Wrap_Point, copy$Wrap_i16, copy$Wrap_u8 } from "./lib.ts";
import { put } from "./fmt.ts";
import type * as Pair from "./fmt.Pair.ts";
import * as Either from "./generics.Either.ts";
Expand All @@ -15,9 +16,9 @@ export function methods(data: Uint8Array, out: rt.ByteVec): void {
const at: (a0: rt.usize) => rt.u8 = (i: rt.usize): rt.u8 => {
return rt.optionUnwrapOr(rt.sliceGet(data, i), 0);
};
const point: Wrap.Wrap<Point.Point> = rt.copy(Wrap.new$Point({ x: at(0) as rt.i32, y: -2 }));
const point: Wrap.Wrap<Point.Point> = copy$Wrap_Point(Wrap.new$Point({ x: at(0) as rt.i32, y: -2 }));
Wrap.bump$Point(point);
const byte: Wrap.Wrap<rt.u8> = rt.copy(Wrap.new$u8(at(1)));
const byte: Wrap.Wrap<rt.u8> = copy$Wrap_u8(Wrap.new$u8(at(1)));
Wrap.bump$u8(byte);
Wrap.bump$u8(byte);
const nested: Wrap.Wrap<Wrap.Wrap<Pair.Pair>> = Wrap.new$Wrap_Pair(Wrap.new$Pair({ _0: at(2), _1: -3 }));
Expand Down Expand Up @@ -71,7 +72,7 @@ export function methods(data: Uint8Array, out: rt.ByteVec): void {
const _193: rt.u8 = rt.optionUnwrapOr(Wrap.get$Option_u8(none), some.count);
const args10: rt.Fmt[] = [(f: rt.Formatter) => Wrap.fmt$Debug_Vec_u16(list, f), (f: rt.Formatter) => Wrap.fmt$Debug_Option_u8(none, f), (f: rt.Formatter) => Wrap.fmt$Debug_Option_u8(some, f), (f: rt.Formatter) => Wrap.fmt$Debug_Result_u8_Shape(err, f), (f: rt.Formatter) => rt.u8Display(_193, f)];
put(out, rt.fmtFormat([args10[0], " ", args10[1], " ", args10[2], " ", args10[3], " ", args10[4]]));
const tagged: Tagged.Tagged<Either.Either<rt.u8, rt.u16>, rt.i16> = new Tagged.Tagged({ key: { tag: "Right", value: 500 } as Either.Either<rt.u8, rt.u16>, inner: Wrap.new$i16(rt.i16Sub(at(8) as rt.i16, 100)), all: rt.sliceToVec([Wrap.new$i16(-1), Wrap.new$i16(at(9) as rt.i16)]) });
const tagged: Tagged.Tagged<Either.Either<rt.u8, rt.u16>, rt.i16> = new Tagged.Tagged({ key: { tag: "Right", value: 500 } as Either.Either<rt.u8, rt.u16>, inner: Wrap.new$i16(rt.i16Sub(at(8) as rt.i16, 100)), all: [Wrap.new$i16(-1), Wrap.new$i16(at(9) as rt.i16)].map(copy$Wrap_i16) });
[Tagged.first$Either_u8_u16_i16(tagged), tagged] as [Wrap.Wrap<rt.i16> | undefined, Tagged.Tagged<Either.Either<rt.u8, rt.u16>, rt.i16>];
const _241: rt.Fmt = (f: rt.Formatter) => Tagged.fmt$Debug_Either_u8_u16_i16(tagged, f);
const arg5 = Tagged.first$Either_u8_u16_i16(tagged);
Expand Down
5 changes: 3 additions & 2 deletions ts/fixtures/lang/expected/iters.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Generated by rust2-ts. Do not edit.

import * as rt from "./rt.ts";
import { copy$Bumped, copy$u8s } from "./lib.ts";
import * as Bumped from "./iters.Bumped.ts";
import * as Countdown from "./iters.Countdown.ts";
import * as Doubled from "./iters.Doubled.ts";
Expand Down Expand Up @@ -124,7 +125,7 @@ export function adaptors(kind: rt.u8, data: Uint8Array, out: rt.ByteVec): void {
const b3: rt.u8 = _2;
return Uint8Array.of(b3, ~b3 & 0xff);
}));
const copies: Uint8Array[] = rt.iterToArray(rt.iterMap(rt.iterSlice(pairs), rt.copy));
const copies: Uint8Array[] = rt.iterToArray(rt.iterMap(rt.iterSlice(pairs), copy$u8s));
if (!((copies.length === 0))) {
const at = rt.idx(copies, 0);
copies[at][0] = 85;
Expand Down Expand Up @@ -665,7 +666,7 @@ export function values(data: Uint8Array, out: rt.ByteVec): void {
rt.iterExtendBytes(out, rt.iterMap(rt.iterMap(rt.iterSlice(bumps), Bumped.clone$Clone), (b5: Bumped.Bumped): rt.u8 => {
return b5._0;
}));
rt.iterExtendBytes(out, rt.iterMap(rt.iterMap(rt.iterSlice(bumps), rt.copy), (b6: Bumped.Bumped): rt.u8 => {
rt.iterExtendBytes(out, rt.iterMap(rt.iterMap(rt.iterSlice(bumps), copy$Bumped), (b6: Bumped.Bumped): rt.u8 => {
return b6._0;
}));
rt.iterExtendBytes(out, rt.iterMap(rt.iterMap(rt.iterSlice(rt.iterToArray(rt.iterMap(rt.iterSlice(data), (_23: rt.u8): Wrapper.Wrapper<Bumped.Bumped> => {
Expand Down
3 changes: 2 additions & 1 deletion ts/fixtures/lang/expected/keys.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Generated by rust2-ts. Do not edit.

import * as rt from "./rt.ts";
import { copy$Horizon } from "./lib.ts";
import * as Hop from "./keys.Hop.ts";
import * as Horizon from "./keys.Horizon.ts";
import * as Liar from "./keys.Liar.ts";
Expand Down Expand Up @@ -289,7 +290,7 @@ export function options(data: Uint8Array, out: rt.ByteVec): void {
})));
rt.byteVecPush(out, (_310[0][1].exclude !== undefined ? 1 : 0) | (((_310[0][1].local ? 1 : 0) << 1) & 0xff));
rt.byteVecPush(out, _310[1]);
rt.byteVecPush(out, rt.hashIndex(hashed, [_310[0][0], rt.copy(_310[0][1])] as [rt.u8, Horizon.Horizon]));
rt.byteVecPush(out, rt.hashIndex(hashed, [_310[0][0], copy$Horizon(_310[0][1])] as [rt.u8, Horizon.Horizon]));
}
} catch (e) {
b4: {
Expand Down
Loading