Skip to content

Commit

Permalink
qe: fix a compiler warning when driver adapters are disabled (#4727)
Browse files Browse the repository at this point in the history
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
```
  • Loading branch information
aqrln authored Feb 13, 2024
1 parent 1eb2deb commit ed5ca1a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions query-engine/request-handlers/src/load_executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ pub async fn load(
features: PreviewFeatures,
) -> query_core::Result<Box<dyn QueryExecutor + Send + Sync + 'static>> {
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") {
Expand Down

0 comments on commit ed5ca1a

Please sign in to comment.