Skip to content

Commit

Permalink
style: run ./lint.sh --mode=fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ologbonowiwi committed Jan 29, 2024
1 parent 7dc62fd commit 35d5548
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
6 changes: 5 additions & 1 deletion src/blueprint/operators/call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,11 @@ impl TryFrom<Expression> for Grpc {
fn get_type_and_field(call: &config::Call) -> Option<(String, String)> {
if let Some(query) = &call.query {
Some(("Query".to_string(), query.clone()))
} else { call.mutation.as_ref().map(|mutation| ("Mutation".to_string(), mutation.clone())) }
} else {
call.mutation
.as_ref()
.map(|mutation| ("Mutation".to_string(), mutation.clone()))
}
}

pub fn compile_call(
Expand Down
24 changes: 12 additions & 12 deletions src/blueprint/operators/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -560,10 +560,10 @@ mod tests {
async fn test_relation_difference() {
let expected = json!([1]);
let actual = Expr::eval(
json!({"body": {"difference": [[{"const": 1}, {"const": 2}, {"const": 3}], [{"const": 2}, {"const": 3}]]}}),
)
.await
.unwrap();
json!({"body": {"difference": [[{"const": 1}, {"const": 2}, {"const": 3}], [{"const": 2}, {"const": 3}]]}}),
)
.await
.unwrap();

assert_eq!(actual, expected);
}
Expand Down Expand Up @@ -812,10 +812,10 @@ mod tests {
async fn test_relation_max() {
let expected = json!(923.83);
let actual = Expr::eval(
json!({"body": {"max": [{"const": 1}, {"const": 23}, {"const": -423}, {"const": 0}, {"const": 923.83}]}}),
)
.await
.unwrap();
json!({"body": {"max": [{"const": 1}, {"const": 23}, {"const": -423}, {"const": 0}, {"const": 923.83}]}}),
)
.await
.unwrap();
assert_eq!(actual, expected);

let expected = json!("z");
Expand All @@ -839,10 +839,10 @@ mod tests {
async fn test_relation_min() {
let expected = json!(-423);
let actual = Expr::eval(
json!({"body": {"min": [{"const": 1}, {"const": 23}, {"const": -423}, {"const": 0}, {"const": 923.83}]}}),
)
.await
.unwrap();
json!({"body": {"min": [{"const": 1}, {"const": 23}, {"const": -423}, {"const": 0}, {"const": 923.83}]}}),
)
.await
.unwrap();
assert_eq!(actual, expected);

let expected = json!("abc");
Expand Down

0 comments on commit 35d5548

Please sign in to comment.