From 85b5ab0fb352e90cd5dbbdc19f9574862a7b7137 Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Wed, 28 Oct 2020 15:02:45 +0100 Subject: [PATCH] Fix cfg-specific unused lints --- sqlx-core/src/common/statement_cache.rs | 1 + sqlx-macros/src/query/mod.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sqlx-core/src/common/statement_cache.rs b/sqlx-core/src/common/statement_cache.rs index d5695a7c..2ae09720 100644 --- a/sqlx-core/src/common/statement_cache.rs +++ b/sqlx-core/src/common/statement_cache.rs @@ -65,6 +65,7 @@ impl StatementCache { } /// Returns true if the cache capacity is more than 0. + #[allow(dead_code)] // Only used for some `cfg`s pub fn is_enabled(&self) -> bool { self.capacity() > 0 } diff --git a/sqlx-macros/src/query/mod.rs b/sqlx-macros/src/query/mod.rs index 09b25036..eb568b6f 100644 --- a/sqlx-macros/src/query/mod.rs +++ b/sqlx-macros/src/query/mod.rs @@ -187,7 +187,7 @@ impl DescribeExt for Describe {} fn expand_with_data( input: QueryMacroInput, data: QueryData, - offline: bool, + #[allow(unused_variables)] offline: bool, ) -> crate::Result where Describe: DescribeExt,