File tree Expand file tree Collapse file tree 2 files changed +10
-9
lines changed
packages/cubejs-backend-native/src
rust/cubeorchestrator/src Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -512,16 +512,14 @@ fn parse_cubestore_ws_result_message(mut cx: FunctionContext) -> JsResult<JsBox<
512512 let msg = cx. argument :: < JsBuffer > ( 0 ) ?;
513513 let msg_data = msg. as_slice ( & cx) ;
514514 match CubeStoreResult :: new ( msg_data) {
515- Ok ( result) => {
516- Ok ( cx. boxed ( result) )
517- }
515+ Ok ( result) => Ok ( cx. boxed ( result) ) ,
518516 Err ( err) => cx. throw_error ( err. to_string ( ) ) ,
519517 }
520518}
521519
522520fn get_cubestore_result ( mut cx : FunctionContext ) -> JsResult < JsValue > {
523521 let result = cx. argument :: < JsBox < CubeStoreResult > > ( 0 ) ?;
524-
522+
525523 let js_array = cx. execute_scoped ( |mut cx| {
526524 let js_array = JsArray :: new ( & mut cx, result. rows . len ( ) ) ;
527525
Original file line number Diff line number Diff line change 1- use neon:: prelude:: Finalize ;
21use cubeshared:: codegen:: { root_as_http_message, HttpCommand } ;
2+ use neon:: prelude:: Finalize ;
33
44#[ derive( Debug ) ]
55pub enum ParseError {
@@ -40,8 +40,8 @@ impl CubeStoreResult {
4040 rows : vec ! [ ] ,
4141 } ;
4242
43- let http_message = root_as_http_message ( msg_data )
44- . map_err ( |_| ParseError :: FlatBufferError ) ?;
43+ let http_message =
44+ root_as_http_message ( msg_data ) . map_err ( |_| ParseError :: FlatBufferError ) ?;
4545
4646 match http_message. command_type ( ) {
4747 HttpCommand :: HttpError => {
@@ -62,7 +62,10 @@ impl CubeStoreResult {
6262 return Err ( ParseError :: ColumnNameNotDefined ) ;
6363 }
6464
65- result. columns = result_set_columns. iter ( ) . map ( |val| val. to_owned ( ) ) . collect ( ) ;
65+ result. columns = result_set_columns
66+ . iter ( )
67+ . map ( |val| val. to_owned ( ) )
68+ . collect ( ) ;
6669 let result_set_rows = result_set. rows ( ) . ok_or ( ParseError :: EmptyResultSet ) ?;
6770 result. rows = Vec :: with_capacity ( result_set_rows. len ( ) ) ;
6871
@@ -77,7 +80,7 @@ impl CubeStoreResult {
7780 }
7881
7982 Ok ( result)
80- } ,
83+ }
8184 _ => Err ( ParseError :: UnsupportedCommand ) ,
8285 }
8386 }
You can’t perform that action at this time.
0 commit comments