summaryrefslogtreecommitdiff
path: root/js/truncate.ts
diff options
context:
space:
mode:
authorJonathon Orsi <jonathon.orsi@gmail.com>2019-04-07 20:51:43 -0400
committerRyan Dahl <ry@tinyclouds.org>2019-04-07 20:51:43 -0400
commit3452a10840ef47bb5546969ebe776289c7b095f1 (patch)
tree165439d870c7fdc2b914d9e008162ea7c17b4cb2 /js/truncate.ts
parent86aee7f13751bd4707f6c2fe367be2359fde84b2 (diff)
use flatbuffer create functions to add fields (#2046)
Diffstat (limited to 'js/truncate.ts')
-rw-r--r--js/truncate.ts5
1 files changed, 1 insertions, 4 deletions
diff --git a/js/truncate.ts b/js/truncate.ts
index c721404a1..0e9a8b977 100644
--- a/js/truncate.ts
+++ b/js/truncate.ts
@@ -10,10 +10,7 @@ function req(
const builder = flatbuffers.createBuilder();
const name_ = builder.createString(name);
len = len && len > 0 ? Math.floor(len) : 0;
- msg.Truncate.startTruncate(builder);
- msg.Truncate.addName(builder, name_);
- msg.Truncate.addLen(builder, len);
- const inner = msg.Truncate.endTruncate(builder);
+ const inner = msg.Truncate.createTruncate(builder, name_, len);
return [builder, msg.Any.Truncate, inner];
}