Skip to content

Commit 72dfdf2

Browse files
author
Sean Loiselle
committed
clippy: allow extra_unused_lifetimes in new contexts for EnumKind
1 parent 428f9c8 commit 72dfdf2

File tree

6 files changed

+18
-4
lines changed

6 files changed

+18
-4
lines changed

src/adapter/src/client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ impl SessionClient {
408408
for stmt in stmts {
409409
let execute_responses = Plan::generated_from((&stmt).into())
410410
.into_iter()
411-
.map(|plan| ExecuteResponse::generated_from(plan))
411+
.map(ExecuteResponse::generated_from)
412412
.flatten()
413413
.collect::<Vec<_>>();
414414

src/adapter/src/command.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
// the Business Source License, use of this software will be governed
88
// by the Apache License, Version 2.0.
99

10+
// `EnumKind` unconditionally introduces a lifetime. TODO: remove this once
11+
// https://github.com/rust-lang/rust-clippy/pull/9037 makes it into stable
12+
#![allow(clippy::extra_unused_lifetimes)]
13+
1014
use std::fmt;
1115
use std::future::Future;
1216
use std::pin::Pin;
@@ -607,7 +611,7 @@ impl ExecuteResponse {
607611
}
608612

609613
/// Expresses which [`PlanKind`] generate which set of
610-
/// [`ExecuteResponseKind`].
614+
/// `ExecuteResponseKind`.
611615
///
612616
/// Empty results indicate that the type of response is not known.
613617
pub fn generated_from(plan: PlanKind) -> Vec<ExecuteResponseKind> {

src/avro/src/types.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323

2424
//! Logic handling the intermediate representation of Avro values.
2525
26-
// `EnumKind` unconditionally introduces a lifetime.
26+
// `EnumKind` unconditionally introduces a lifetime. TODO: remove this once
27+
// https://github.com/rust-lang/rust-clippy/pull/9037 makes it into stable
2728
#![allow(clippy::extra_unused_lifetimes)]
2829

2930
use std::collections::HashMap;

src/repr/src/scalar.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
// the Business Source License, use of this software will be governed
88
// by the Apache License, Version 2.0.
99

10-
// `EnumKind` and various macros unconditionally introduce lifetimes.
10+
// `EnumKind` unconditionally introduces a lifetime. TODO: remove this once
11+
// https://github.com/rust-lang/rust-clippy/pull/9037 makes it into stable
1112
#![allow(clippy::extra_unused_lifetimes)]
1213

1314
use std::fmt::{self, Write};

src/sql-parser/src/ast/defs/statement.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818
// See the License for the specific language governing permissions and
1919
// limitations under the License.
2020

21+
// `EnumKind` unconditionally introduces a lifetime. TODO: remove this once
22+
// https://github.com/rust-lang/rust-clippy/pull/9037 makes it into stable
23+
#![allow(clippy::extra_unused_lifetimes)]
24+
2125
use std::fmt;
2226

2327
use enum_kinds::EnumKind;

src/sql/src/plan.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@
2626
// `plan_root_query` and fanning out based on the contents of the `SELECT`
2727
// statement.
2828

29+
// `EnumKind` unconditionally introduces a lifetime. TODO: remove this once
30+
// https://github.com/rust-lang/rust-clippy/pull/9037 makes it into stable
31+
#![allow(clippy::extra_unused_lifetimes)]
32+
2933
use std::collections::{BTreeSet, HashMap, HashSet};
3034
use std::num::NonZeroUsize;
3135
use std::time::Duration;

0 commit comments

Comments
 (0)