diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2019-01-03 22:11:01 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-03 22:11:01 -0500 |
commit | ea6c9f2f365698e8120177bb7a1344e83f859180 (patch) | |
tree | 3174c0cc4004063fb626255c82fbb4ffefad5d7a /src/ops.rs | |
parent | 6be1164d8917b1ee40d344151f387417352fc804 (diff) |
Revert "use byte array instead of string for code fetch (#1307)" (#1455)
This reverts commit e976b3e0414dc768624b77e431ee7f55b03b76a4.
There is nothing technically wrong with this commit, but it's adding
complexity to a big refactor (native ES modules #975). Since it's not
necessary and simply a philosophical preference, I will revert for now
and try to bring it back later.
Diffstat (limited to 'src/ops.rs')
-rw-r--r-- | src/ops.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ops.rs b/src/ops.rs index 5b2598728..638195442 100644 --- a/src/ops.rs +++ b/src/ops.rs @@ -268,14 +268,14 @@ fn op_code_fetch( module_name: Some(builder.create_string(&out.module_name)), filename: Some(builder.create_string(&out.filename)), media_type: out.media_type, - source_code: Some(builder.create_vector(&out.source_code)), + source_code: Some(builder.create_string(&out.source_code)), ..Default::default() }; if let Some(ref output_code) = out.maybe_output_code { - msg_args.output_code = Some(builder.create_vector(output_code)); + msg_args.output_code = Some(builder.create_string(output_code)); } if let Some(ref source_map) = out.maybe_source_map { - msg_args.source_map = Some(builder.create_vector(source_map)); + msg_args.source_map = Some(builder.create_string(source_map)); } let inner = msg::CodeFetchRes::create(builder, &msg_args); Ok(serialize_response( @@ -305,7 +305,7 @@ fn op_code_cache( Box::new(futures::future::result(|| -> OpResult { state .dir - .code_cache(filename, &source_code, &output_code, &source_map)?; + .code_cache(filename, source_code, output_code, source_map)?; Ok(empty_buf()) }())) } |