Skip to content

Commit

Permalink
Hotfix for double encodeInto call
Browse files Browse the repository at this point in the history
This was a regression introduced in the last commit of rustwasm#1470, which might make Unicode strings 2x slower to pass.
  • Loading branch information
RReverser committed May 14, 2019
1 parent 15defcf commit 716ed0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/cli-support/src/js/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1501,7 +1501,7 @@ impl<'a> Context<'a> {
const view = getUint8Memory().subarray(ptr + offset, ptr + size);
const ret = cachedTextEncoder.encodeInto(arg, view);
{}
offset += cachedTextEncoder.encodeInto(arg, view).written;
offset += ret.written;
}}
WASM_VECTOR_LEN = offset;
return ptr;
Expand Down

0 comments on commit 716ed0d

Please sign in to comment.