Skip to content

Commit 3520379

Browse files
committed
cargo fmt
1 parent 9e079b4 commit 3520379

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

packages/cubejs-backend-native/src/node_export.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff 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

522520
fn 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

rust/cubeorchestrator/src/cubestore_message_parser.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
use neon::prelude::Finalize;
21
use cubeshared::codegen::{root_as_http_message, HttpCommand};
2+
use neon::prelude::Finalize;
33

44
#[derive(Debug)]
55
pub 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
}

0 commit comments

Comments
 (0)