diff options
author | Andy Finch <andyfinch7@gmail.com> | 2020-02-09 13:54:16 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-09 10:54:16 -0800 |
commit | 1abd408770f6dc4205a471bb79d48b643f53074d (patch) | |
tree | b0d3c0e40932e7885158b65aee33db7968c80db2 /cli/ops/dispatch_json.rs | |
parent | 61c5bb86db42a2d575f51e966dbc77f711c64054 (diff) |
No longer require aligned buffer for shared queue (#3935)
Fixes: #3925
Diffstat (limited to 'cli/ops/dispatch_json.rs')
-rw-r--r-- | cli/ops/dispatch_json.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/cli/ops/dispatch_json.rs b/cli/ops/dispatch_json.rs index 60c57ef67..2cb3a8400 100644 --- a/cli/ops/dispatch_json.rs +++ b/cli/ops/dispatch_json.rs @@ -32,11 +32,7 @@ fn serialize_result(promise_id: Option<u64>, result: JsonResult) -> Buf { Ok(v) => json!({ "ok": v, "promiseId": promise_id }), Err(err) => json!({ "err": json_err(err), "promiseId": promise_id }), }; - let mut vec = serde_json::to_vec(&value).unwrap(); - debug!("JSON response pre-align, len={}", vec.len()); - // Align to 32bit word, padding with the space character. - vec.resize((vec.len() + 3usize) & !3usize, b' '); - vec.into_boxed_slice() + serde_json::to_vec(&value).unwrap().into_boxed_slice() } #[derive(Deserialize)] |