diff --git a/apollo-router/src/compute_job.rs b/apollo-router/src/compute_job.rs index 086036f606..fda85d0d30 100644 --- a/apollo-router/src/compute_job.rs +++ b/apollo-router/src/compute_job.rs @@ -128,12 +128,10 @@ mod tests { #[tokio::test] async fn test_executes_on_different_thread() { let test_thread = std::thread::current().id(); - let job_thread = execute(Priority::P4, || { - std::thread::current().id() - }) - .unwrap() - .await - .unwrap(); + let job_thread = execute(Priority::P4, || std::thread::current().id()) + .unwrap() + .await + .unwrap(); assert_ne!(job_thread, test_thread) } diff --git a/apollo-router/src/introspection.rs b/apollo-router/src/introspection.rs index 88b61459ba..2ea6c6a70d 100644 --- a/apollo-router/src/introspection.rs +++ b/apollo-router/src/introspection.rs @@ -160,10 +160,9 @@ impl IntrospectionCache { let schema = schema.clone(); let doc = doc.clone(); let priority = compute_job::Priority::P1; // Low priority - let response = compute_job::execute( - priority, - move || Self::execute_introspection(max_depth, &schema, &doc), - )? + let response = compute_job::execute(priority, move || { + Self::execute_introspection(max_depth, &schema, &doc) + })? // `expect()` propagates any panic that potentially happens in the closure, but: // // * We try to avoid such panics in the first place and consider them bugs diff --git a/apollo-router/src/services/supergraph/service.rs b/apollo-router/src/services/supergraph/service.rs index b7ea8fb008..c5dafe2eab 100644 --- a/apollo-router/src/services/supergraph/service.rs +++ b/apollo-router/src/services/supergraph/service.rs @@ -219,8 +219,9 @@ async fn service_call( Err(err) => { let status = match &err { CacheResolverError::Backpressure(_) => StatusCode::SERVICE_UNAVAILABLE, - CacheResolverError::RetrievalError(_) | - CacheResolverError::BatchingError(_) => StatusCode::BAD_REQUEST, + CacheResolverError::RetrievalError(_) | CacheResolverError::BatchingError(_) => { + StatusCode::BAD_REQUEST + } }; match err.into_graphql_errors() { Ok(gql_errors) => {