From ed5ca1a26888e528edca130cd43914e3936d6561 Mon Sep 17 00:00:00 2001 From: Alexey Orlenko Date: Tue, 13 Feb 2024 22:23:14 +0100 Subject: [PATCH] qe: fix a compiler warning when driver adapters are disabled (#4727) Fixes the following warning when compiling the tests: ``` warning: unused variable: `adapter` --> query-engine/request-handlers/src/load_executor.rs:28:29 | 28 | ConnectorKind::Js { adapter, _phantom } => { | ^^^^^^^ help: try ignoring the field: `adapter: _` | = note: `#[warn(unused_variables)]` on by default ``` --- query-engine/request-handlers/src/load_executor.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/query-engine/request-handlers/src/load_executor.rs b/query-engine/request-handlers/src/load_executor.rs index 97f029cc60ed..6cb112383f41 100644 --- a/query-engine/request-handlers/src/load_executor.rs +++ b/query-engine/request-handlers/src/load_executor.rs @@ -25,14 +25,14 @@ pub async fn load( features: PreviewFeatures, ) -> query_core::Result> { match connector_kind { - ConnectorKind::Js { adapter, _phantom } => { - #[cfg(not(feature = "driver-adapters"))] + #[cfg(not(feature = "driver-adapters"))] + ConnectorKind::Js { .. } => { panic!("Driver adapters are not enabled, but connector mode is set to JS"); - - #[cfg(feature = "driver-adapters")] - driver_adapter(adapter, features).await } + #[cfg(feature = "driver-adapters")] + ConnectorKind::Js { adapter, _phantom } => driver_adapter(adapter, features).await, + #[cfg(feature = "native")] ConnectorKind::Rust { url, datasource } => { if let Ok(value) = env::var("PRISMA_DISABLE_QUAINT_EXECUTORS") {