mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-04-25 14:12:13 +00:00
Hotfix for double encodeInto call
This was a regression introduced in the last commit of https://github.com/rustwasm/wasm-bindgen/pull/1470, which might make Unicode strings 2x slower to pass.
This commit is contained in:
parent
15defcfd3a
commit
716ed0d891
@ -1501,7 +1501,7 @@ impl<'a> Context<'a> {
|
|||||||
const view = getUint8Memory().subarray(ptr + offset, ptr + size);
|
const view = getUint8Memory().subarray(ptr + offset, ptr + size);
|
||||||
const ret = cachedTextEncoder.encodeInto(arg, view);
|
const ret = cachedTextEncoder.encodeInto(arg, view);
|
||||||
{}
|
{}
|
||||||
offset += cachedTextEncoder.encodeInto(arg, view).written;
|
offset += ret.written;
|
||||||
}}
|
}}
|
||||||
WASM_VECTOR_LEN = offset;
|
WASM_VECTOR_LEN = offset;
|
||||||
return ptr;
|
return ptr;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user