Skip to content

Commit a901b14

Browse files
danieljharveyhasura-bot
authored andcommitted
Upgrade to Rust 1.86.0 (#1918)
<!-- The PR description should answer 2 important questions: --> ### What New `rustc` version. Upgrade and fix lints (mostly automatically). V3_GIT_ORIGIN_REV_ID: e92532a8ae56e9d660401ed772536bd9018d8fe1
1 parent 3ea92c7 commit a901b14

File tree

54 files changed

+117
-121
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+117
-121
lines changed

v3/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# This should match the Rust version in rust-toolchain.yaml and the other Dockerfiles.
2-
FROM rust:1.85.0 AS chef
2+
FROM rust:1.86.0 AS chef
33

44
WORKDIR /app
55

v3/crates/auth/hasura-authn-jwt/src/jwt.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -580,15 +580,15 @@ pub(crate) async fn decode_and_parse_hasura_claims(
580580
// Additional validations according to the `jwt_config`.
581581
if let Some(aud) = &jwt_config.audience {
582582
validation.set_audience(&aud.iter().collect::<Vec<_>>());
583-
};
583+
}
584584

585585
if let Some(issuer) = &jwt_config.issuer {
586586
validation.set_issuer(&[issuer]);
587-
};
587+
}
588588

589589
if let Some(leeway) = jwt_config.allowed_skew {
590590
validation.leeway = leeway;
591-
};
591+
}
592592

593593
let claims: serde_json::Value = decode(&jwt, &decoding_key, &validation)
594594
.map_err(InternalError::JWTDecodingError)?

v3/crates/auth/hasura-authn/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ fn validate_auth_config(auth_config: &AuthConfig) -> Result<Vec<Warning>, Error>
281281
.and_then(|c| c.headers.as_ref())
282282
{
283283
warnings.extend(validate_header_config(headers_config));
284-
};
284+
}
285285
}
286286
webhook::AuthHookConfigV3::POST(config) => {
287287
if let Some(headers_config) = config
@@ -290,15 +290,15 @@ fn validate_auth_config(auth_config: &AuthConfig) -> Result<Vec<Warning>, Error>
290290
.and_then(|c| c.headers.as_ref())
291291
{
292292
warnings.extend(validate_header_config(headers_config));
293-
};
293+
}
294294
if let Some(body_header_config) = config
295295
.custom_headers_config
296296
.as_ref()
297297
.and_then(|c| c.body.as_ref())
298298
.and_then(|c| c.headers.as_ref())
299299
{
300300
warnings.extend(validate_header_config(body_header_config));
301-
};
301+
}
302302
}
303303
}
304304
}

v3/crates/custom-connector/src/collections/institutions.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ fn check_institution_query<'a>(
8484
return true;
8585
}
8686
}
87-
};
87+
}
8888

8989
// check location
9090
if let Some(query_location) = &institution_query.location {
@@ -118,7 +118,7 @@ fn check_institution_query<'a>(
118118
}
119119
}
120120
}
121-
};
121+
}
122122

123123
// TODO: implement filters for the other fields
124124

v3/crates/engine/tests/common.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,7 @@ async fn run_query_graphql_ws(
796796
graphql_ws::Message::Raw(_) => {
797797
panic!("Expected a Complete message")
798798
}
799-
};
799+
}
800800
}
801801
response
802802
}

v3/crates/execute/src/execute/remote_joins/collect.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ fn collect_argument_from_rows(
103103
ProcessResponseAs::Array { .. } | ProcessResponseAs::Object { .. } => {
104104
collect_argument_from_row(row, join_fields, path, &mut arguments)?;
105105
}
106-
ProcessResponseAs::Aggregates { .. } => {
106+
ProcessResponseAs::Aggregates => {
107107
return Err(error::FieldInternalError::InternalGeneric {
108108
description:
109109
"Unexpected aggregate response on the LHS of a remote join"

v3/crates/execute/src/execute/remote_joins/join.rs

Lines changed: 29 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ pub(crate) fn join_responses(
4949
rhs_response,
5050
)?;
5151
}
52-
};
52+
}
5353
}
5454
}
5555
}
@@ -198,43 +198,41 @@ fn visit_location_path_and_insert_value(
198198
row_set.rows = Some(rows);
199199
*row_field_val = ndc_models::RowFieldValue(json::to_value(row_set)?);
200200
}
201-
LocationKind::NestedData => {
202-
match row_field_val.0 {
203-
serde_json::Value::Array(_) => {
204-
if let Ok(mut rows) = serde_json::from_value::<
205-
Vec<IndexMap<ndc_models::FieldName, ndc_models::RowFieldValue>>,
206-
>(row_field_val.0.clone())
207-
{
208-
for inner_row in &mut rows {
209-
insert_value_into_row(
210-
path_tail,
211-
join_node,
212-
inner_row,
213-
remote_alias.clone(),
214-
rhs_response,
215-
)?;
216-
}
217-
*row_field_val = ndc_models::RowFieldValue(json::to_value(rows)?);
218-
}
219-
}
220-
serde_json::Value::Object(_) => {
221-
if let Ok(mut inner_row) = serde_json::from_value::<
222-
IndexMap<ndc_models::FieldName, ndc_models::RowFieldValue>,
223-
>(row_field_val.0.clone())
224-
{
201+
LocationKind::NestedData => match row_field_val.0 {
202+
serde_json::Value::Array(_) => {
203+
if let Ok(mut rows) = serde_json::from_value::<
204+
Vec<IndexMap<ndc_models::FieldName, ndc_models::RowFieldValue>>,
205+
>(row_field_val.0.clone())
206+
{
207+
for inner_row in &mut rows {
225208
insert_value_into_row(
226209
path_tail,
227210
join_node,
228-
&mut inner_row,
229-
remote_alias,
211+
inner_row,
212+
remote_alias.clone(),
230213
rhs_response,
231214
)?;
232-
*row_field_val = ndc_models::RowFieldValue(json::to_value(inner_row)?);
233215
}
216+
*row_field_val = ndc_models::RowFieldValue(json::to_value(rows)?);
234217
}
235-
_ => (),
236-
};
237-
}
218+
}
219+
serde_json::Value::Object(_) => {
220+
if let Ok(mut inner_row) = serde_json::from_value::<
221+
IndexMap<ndc_models::FieldName, ndc_models::RowFieldValue>,
222+
>(row_field_val.0.clone())
223+
{
224+
insert_value_into_row(
225+
path_tail,
226+
join_node,
227+
&mut inner_row,
228+
remote_alias,
229+
rhs_response,
230+
)?;
231+
*row_field_val = ndc_models::RowFieldValue(json::to_value(inner_row)?);
232+
}
233+
}
234+
_ => (),
235+
},
238236
}
239237
Ok(())
240238
}

v3/crates/graphql/frontend/src/explain.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ async fn get_execution_steps(
376376
}
377377
ProcessResponseAs::Array { .. }
378378
| ProcessResponseAs::Object { .. }
379-
| ProcessResponseAs::Aggregates { .. } => {
379+
| ProcessResponseAs::Aggregates => {
380380
// A model execution node
381381
let data_connector_explain = fetch_explain_from_data_connector(
382382
expose_internal_errors,
@@ -398,7 +398,7 @@ async fn get_execution_steps(
398398
{
399399
sequence_steps.push(Box::new(types::Step::Sequence(join_steps)));
400400
sequence_steps.push(Box::new(types::Step::HashJoin));
401-
};
401+
}
402402
Ok(sequence_steps)
403403
}
404404

@@ -564,16 +564,16 @@ async fn get_join_steps(
564564
}
565565
},
566566
)));
567-
};
567+
}
568568
if let Some(rest_join_steps) =
569569
get_join_steps(expose_internal_errors, location.rest, http_context).await?
570570
{
571571
sequence_steps.push(Box::new(types::Step::Sequence(rest_join_steps)));
572572
sequence_steps.push(Box::new(types::Step::HashJoin));
573-
};
573+
}
574574
if let Some(sequence_steps) = NonEmpty::from_vec(sequence_steps) {
575575
sequence_join_steps.push(Box::new(types::Step::Sequence(sequence_steps)));
576-
};
576+
}
577577
}
578578
Ok(NonEmpty::from_vec(sequence_join_steps))
579579
}

v3/crates/graphql/graphql-ws/src/websocket/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ async fn start_websocket_session<M: WebSocketMetrics>(
259259
.send(types::Message::internal_server_error())
260260
.await;
261261
}
262-
};
262+
}
263263

264264
// Abort the expiry task
265265
if let Some(task) = expiry_task {

v3/crates/graphql/graphql-ws/src/websocket/tasks.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ pub(crate) async fn manage_outgoing_messages<M: WebSocketMetrics + Sync>(
253253
// Return error
254254
Err(err)?;
255255
}
256-
};
256+
}
257257

258258
// Stop the poller if the operation is complete or an error occurred
259259
if let Some(operation_id) = msg.is_complete_or_error() {

0 commit comments

Comments
 (0)