Skip to content

Commit dc19d85

Browse files
committed
Tune lints for 1.83 Rust
1 parent b32004f commit dc19d85

File tree

21 files changed

+66
-66
lines changed

21 files changed

+66
-66
lines changed

juniper/src/ast.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ pub trait ToInputValue<S = DefaultScalarValue>: Sized {
194194
fn to_input_value(&self) -> InputValue<S>;
195195
}
196196

197-
impl<'a> Type<'a> {
197+
impl Type<'_> {
198198
/// Get the name of a named type.
199199
///
200200
/// Only applies to named types; lists will return `None`.
@@ -221,7 +221,7 @@ impl<'a> Type<'a> {
221221
}
222222
}
223223

224-
impl<'a> fmt::Display for Type<'a> {
224+
impl fmt::Display for Type<'_> {
225225
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
226226
match self {
227227
Self::Named(n) => write!(f, "{n}"),

juniper/src/executor/look_ahead.rs

+21-21
Original file line numberDiff line numberDiff line change
@@ -93,17 +93,17 @@ pub struct LookAheadList<'a, S> {
9393
}
9494

9595
// Implemented manually to omit redundant `S: Clone` trait bound, imposed by `#[derive(Clone)]`.
96-
impl<'a, S> Clone for LookAheadList<'a, S> {
96+
impl<S> Clone for LookAheadList<'_, S> {
9797
fn clone(&self) -> Self {
9898
*self
9999
}
100100
}
101101

102102
// Implemented manually to omit redundant `S: Copy` trait bound, imposed by `#[derive(Copy)]`.
103-
impl<'a, S> Copy for LookAheadList<'a, S> {}
103+
impl<S> Copy for LookAheadList<'_, S> {}
104104

105105
// Implemented manually to omit redundant `S: Default` trait bound, imposed by `#[derive(Default)]`.
106-
impl<'a, S> Default for LookAheadList<'a, S> {
106+
impl<S> Default for LookAheadList<'_, S> {
107107
fn default() -> Self {
108108
Self {
109109
input_list: &[],
@@ -114,13 +114,13 @@ impl<'a, S> Default for LookAheadList<'a, S> {
114114

115115
// Implemented manually to omit redundant `S: PartialEq` trait bound, imposed by
116116
// `#[derive(PartialEq)]`.
117-
impl<'a, S: ScalarValue> PartialEq for LookAheadList<'a, S> {
117+
impl<S: ScalarValue> PartialEq for LookAheadList<'_, S> {
118118
fn eq(&self, other: &Self) -> bool {
119119
self.iter().eq(other.iter())
120120
}
121121
}
122122

123-
impl<'a, S: ScalarValue> LookAheadList<'a, S> {
123+
impl<S: ScalarValue> LookAheadList<'_, S> {
124124
/// Returns an [`Iterator`] over the items of this [list].
125125
///
126126
/// [list]: https://spec.graphql.org/October2021#sec-List
@@ -179,7 +179,7 @@ pub mod look_ahead_list {
179179
}
180180
}
181181

182-
impl<'a, S: ScalarValue> DoubleEndedIterator for Iter<'a, S> {
182+
impl<S: ScalarValue> DoubleEndedIterator for Iter<'_, S> {
183183
fn next_back(&mut self) -> Option<Self::Item> {
184184
let vars = self.vars;
185185
self.slice_iter
@@ -203,16 +203,16 @@ pub struct LookAheadObject<'a, S> {
203203
}
204204

205205
// Implemented manually to omit redundant `S: Clone` trait bound, imposed by `#[derive(Clone)]`.
206-
impl<'a, S> Clone for LookAheadObject<'a, S> {
206+
impl<S> Clone for LookAheadObject<'_, S> {
207207
fn clone(&self) -> Self {
208208
*self
209209
}
210210
}
211211

212212
// Implemented manually to omit redundant `S: Copy` trait bound, imposed by `#[derive(Copy)]`.
213-
impl<'a, S> Copy for LookAheadObject<'a, S> {}
213+
impl<S> Copy for LookAheadObject<'_, S> {}
214214

215-
impl<'a, S> Default for LookAheadObject<'a, S> {
215+
impl<S> Default for LookAheadObject<'_, S> {
216216
fn default() -> Self {
217217
Self {
218218
input_object: &[],
@@ -221,13 +221,13 @@ impl<'a, S> Default for LookAheadObject<'a, S> {
221221
}
222222
}
223223

224-
impl<'a, S: ScalarValue> PartialEq for LookAheadObject<'a, S> {
224+
impl<S: ScalarValue> PartialEq for LookAheadObject<'_, S> {
225225
fn eq(&self, other: &Self) -> bool {
226226
self.iter().eq(other.iter())
227227
}
228228
}
229229

230-
impl<'a, S: ScalarValue> LookAheadObject<'a, S> {
230+
impl<S: ScalarValue> LookAheadObject<'_, S> {
231231
/// Returns an [`Iterator`] over this [input object]'s fields.
232232
///
233233
/// [input object]: https://spec.graphql.org/October2021#sec-Input-Objects
@@ -301,7 +301,7 @@ pub mod look_ahead_object {
301301
}
302302
}
303303

304-
impl<'a, S: ScalarValue> DoubleEndedIterator for Iter<'a, S> {
304+
impl<S: ScalarValue> DoubleEndedIterator for Iter<'_, S> {
305305
fn next_back(&mut self) -> Option<Self::Item> {
306306
let vars = self.vars;
307307
self.slice_iter.next_back().map(move |(key, val)| {
@@ -331,14 +331,14 @@ pub struct LookAheadArgument<'a, S> {
331331
}
332332

333333
// Implemented manually to omit redundant `S: Clone` trait bound, imposed by `#[derive(Clone)]`.
334-
impl<'a, S> Clone for LookAheadArgument<'a, S> {
334+
impl<S> Clone for LookAheadArgument<'_, S> {
335335
fn clone(&self) -> Self {
336336
*self
337337
}
338338
}
339339

340340
// Implemented manually to omit redundant `S: Copy` trait bound, imposed by `#[derive(Copy)]`.
341-
impl<'a, S> Copy for LookAheadArgument<'a, S> {}
341+
impl<S> Copy for LookAheadArgument<'_, S> {}
342342

343343
impl<'a, S> LookAheadArgument<'a, S> {
344344
/// Returns the name of this [argument].
@@ -386,7 +386,7 @@ pub struct LookAheadChildren<'a, S> {
386386
}
387387

388388
// Implemented manually to omit redundant `S: Clone` trait bound, imposed by `#[derive(Clone)]`.
389-
impl<'a, S> Clone for LookAheadChildren<'a, S> {
389+
impl<S> Clone for LookAheadChildren<'_, S> {
390390
fn clone(&self) -> Self {
391391
Self {
392392
children: self.children.clone(),
@@ -395,7 +395,7 @@ impl<'a, S> Clone for LookAheadChildren<'a, S> {
395395
}
396396

397397
// Implemented manually to omit redundant `S: Default` trait bound, imposed by `#[derive(Default)]`.
398-
impl<'a, S> Default for LookAheadChildren<'a, S> {
398+
impl<S> Default for LookAheadChildren<'_, S> {
399399
fn default() -> Self {
400400
Self { children: vec![] }
401401
}
@@ -472,14 +472,14 @@ pub(super) enum SelectionSource<'a, S> {
472472
}
473473

474474
// Implemented manually to omit redundant `S: Clone` trait bound, imposed by `#[derive(Clone)]`.
475-
impl<'a, S> Clone for SelectionSource<'a, S> {
475+
impl<S> Clone for SelectionSource<'_, S> {
476476
fn clone(&self) -> Self {
477477
*self
478478
}
479479
}
480480

481481
// Implemented manually to omit redundant `S: Copy` trait bound, imposed by `#[derive(Copy)]`.
482-
impl<'a, S> Copy for SelectionSource<'a, S> {}
482+
impl<S> Copy for SelectionSource<'_, S> {}
483483

484484
/// [Selection] of an executed GraphQL query, used in [look-ahead][0] operations.
485485
///
@@ -496,14 +496,14 @@ pub struct LookAheadSelection<'a, S> {
496496
}
497497

498498
// Implemented manually to omit redundant `S: Clone` trait bound, imposed by `#[derive(Clone)]`.
499-
impl<'a, S> Clone for LookAheadSelection<'a, S> {
499+
impl<S> Clone for LookAheadSelection<'_, S> {
500500
fn clone(&self) -> Self {
501501
*self
502502
}
503503
}
504504

505505
// Implemented manually to omit redundant `S: Copy` trait bound, imposed by `#[derive(Copy)]`.
506-
impl<'a, S> Copy for LookAheadSelection<'a, S> {}
506+
impl<S> Copy for LookAheadSelection<'_, S> {}
507507

508508
impl<'a, S> LookAheadSelection<'a, S> {
509509
/// Constructs a new [`LookAheadSelection`] out of the provided params.
@@ -670,7 +670,7 @@ struct ChildrenBuilder<'a, 'f, S> {
670670
output: Vec<LookAheadSelection<'a, S>>,
671671
}
672672

673-
impl<'a, 'f, S: ScalarValue> ChildrenBuilder<'a, 'f, S> {
673+
impl<'a, S: ScalarValue> ChildrenBuilder<'a, '_, S> {
674674
fn visit_parent_selection(
675675
&mut self,
676676
selection: &'a Selection<'a, S>,

juniper/src/executor/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ impl<S> IntoFieldError<S> for std::convert::Infallible {
273273
}
274274
}
275275

276-
impl<'a, S> IntoFieldError<S> for &'a str {
276+
impl<S> IntoFieldError<S> for &str {
277277
fn into_field_error(self) -> FieldError<S> {
278278
FieldError::<S>::from(self)
279279
}
@@ -285,7 +285,7 @@ impl<S> IntoFieldError<S> for String {
285285
}
286286
}
287287

288-
impl<'a, S> IntoFieldError<S> for Cow<'a, str> {
288+
impl<S> IntoFieldError<S> for Cow<'_, str> {
289289
fn into_field_error(self) -> FieldError<S> {
290290
FieldError::<S>::from(self)
291291
}
@@ -403,7 +403,7 @@ pub trait FromContext<T> {
403403
/// Marker trait for types that can act as context objects for `GraphQL` types.
404404
pub trait Context {}
405405

406-
impl<'a, C: Context> Context for &'a C {}
406+
impl<C: Context> Context for &C {}
407407

408408
static NULL_CONTEXT: () = ();
409409

@@ -755,7 +755,7 @@ where
755755
}
756756
}
757757

758-
impl<'a> FieldPath<'a> {
758+
impl FieldPath<'_> {
759759
fn construct_path(&self, acc: &mut Vec<String>) {
760760
match self {
761761
FieldPath::Root(_) => (),

juniper/src/executor/owned_executor.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pub struct OwnedExecutor<'a, CtxT, S> {
2525
pub(super) field_path: Arc<FieldPath<'a>>,
2626
}
2727

28-
impl<'a, CtxT, S> Clone for OwnedExecutor<'a, CtxT, S>
28+
impl<CtxT, S> Clone for OwnedExecutor<'_, CtxT, S>
2929
where
3030
S: Clone,
3131
{

juniper/src/integrations/serde.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ impl<'de> Deserialize<'de> for DefaultScalarValue {
289289
fn deserialize<D: Deserializer<'de>>(de: D) -> Result<Self, D::Error> {
290290
struct Visitor;
291291

292-
impl<'de> de::Visitor<'de> for Visitor {
292+
impl de::Visitor<'_> for Visitor {
293293
type Value = DefaultScalarValue;
294294

295295
fn expecting(&self, f: &mut fmt::Formatter) -> fmt::Result {

juniper/src/macros/reflect.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ pub trait BaseType<S> {
4444
const NAME: Type;
4545
}
4646

47-
impl<'a, S, T: BaseType<S> + ?Sized> BaseType<S> for &'a T {
47+
impl<S, T: BaseType<S> + ?Sized> BaseType<S> for &T {
4848
const NAME: Type = T::NAME;
4949
}
5050

51-
impl<'ctx, S, T> BaseType<S> for (&'ctx T::Context, T)
51+
impl<S, T> BaseType<S> for (&T::Context, T)
5252
where
5353
S: ScalarValue,
5454
T: BaseType<S> + GraphQLValue<S>,
@@ -105,11 +105,11 @@ pub trait BaseSubTypes<S> {
105105
const NAMES: Types;
106106
}
107107

108-
impl<'a, S, T: BaseSubTypes<S> + ?Sized> BaseSubTypes<S> for &'a T {
108+
impl<S, T: BaseSubTypes<S> + ?Sized> BaseSubTypes<S> for &T {
109109
const NAMES: Types = T::NAMES;
110110
}
111111

112-
impl<'ctx, S, T> BaseSubTypes<S> for (&'ctx T::Context, T)
112+
impl<S, T> BaseSubTypes<S> for (&T::Context, T)
113113
where
114114
S: ScalarValue,
115115
T: BaseSubTypes<S> + GraphQLValue<S>,
@@ -205,7 +205,7 @@ pub trait WrappedType<S> {
205205
const VALUE: WrappedValue;
206206
}
207207

208-
impl<'ctx, S, T: WrappedType<S>> WrappedType<S> for (&'ctx T::Context, T)
208+
impl<S, T: WrappedType<S>> WrappedType<S> for (&T::Context, T)
209209
where
210210
S: ScalarValue,
211211
T: GraphQLValue<S>,
@@ -237,7 +237,7 @@ impl<S, T: WrappedType<S>, const N: usize> WrappedType<S> for [T; N] {
237237
const VALUE: u128 = T::VALUE * 10 + 3;
238238
}
239239

240-
impl<'a, S, T: WrappedType<S> + ?Sized> WrappedType<S> for &'a T {
240+
impl<S, T: WrappedType<S> + ?Sized> WrappedType<S> for &T {
241241
const VALUE: u128 = T::VALUE;
242242
}
243243

juniper/src/parser/lexer.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ impl<'a> Iterator for Lexer<'a> {
477477
}
478478
}
479479

480-
impl<'a> fmt::Display for Token<'a> {
480+
impl fmt::Display for Token<'_> {
481481
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
482482
match *self {
483483
Token::Name(name) => write!(f, "{name}"),

juniper/src/schema/meta.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ pub struct Field<'a, S> {
181181
pub deprecation_status: DeprecationStatus,
182182
}
183183

184-
impl<'a, S> Field<'a, S> {
184+
impl<S> Field<'_, S> {
185185
/// Returns true if the type is built-in to GraphQL.
186186
pub fn is_builtin(&self) -> bool {
187187
// "used exclusively by GraphQL’s introspection system"
@@ -202,7 +202,7 @@ pub struct Argument<'a, S> {
202202
pub default_value: Option<InputValue<S>>,
203203
}
204204

205-
impl<'a, S> Argument<'a, S> {
205+
impl<S> Argument<'_, S> {
206206
/// Returns true if the type is built-in to GraphQL.
207207
pub fn is_builtin(&self) -> bool {
208208
// "used exclusively by GraphQL’s introspection system"
@@ -770,7 +770,7 @@ impl EnumValue {
770770
}
771771
}
772772

773-
impl<'a, S: fmt::Debug> fmt::Debug for ScalarMeta<'a, S> {
773+
impl<S: fmt::Debug> fmt::Debug for ScalarMeta<'_, S> {
774774
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
775775
fmt.debug_struct("ScalarMeta")
776776
.field("name", &self.name)
@@ -779,7 +779,7 @@ impl<'a, S: fmt::Debug> fmt::Debug for ScalarMeta<'a, S> {
779779
}
780780
}
781781

782-
impl<'a, S: fmt::Debug> fmt::Debug for EnumMeta<'a, S> {
782+
impl<S: fmt::Debug> fmt::Debug for EnumMeta<'_, S> {
783783
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
784784
fmt.debug_struct("EnumMeta")
785785
.field("name", &self.name)
@@ -789,7 +789,7 @@ impl<'a, S: fmt::Debug> fmt::Debug for EnumMeta<'a, S> {
789789
}
790790
}
791791

792-
impl<'a, S: fmt::Debug> fmt::Debug for InputObjectMeta<'a, S> {
792+
impl<S: fmt::Debug> fmt::Debug for InputObjectMeta<'_, S> {
793793
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
794794
fmt.debug_struct("InputObjectMeta")
795795
.field("name", &self.name)

juniper/src/schema/model.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ pub struct SchemaType<'a, S> {
5656
directives: FnvHashMap<String, DirectiveType<'a, S>>,
5757
}
5858

59-
impl<'a, S> Context for SchemaType<'a, S> {}
59+
impl<S> Context for SchemaType<'_, S> {}
6060

6161
#[derive(Clone)]
6262
pub enum TypeType<'a, S: 'a> {
@@ -96,8 +96,8 @@ pub enum DirectiveLocation {
9696
EnumValue,
9797
}
9898

99-
impl<'a, QueryT, MutationT, SubscriptionT>
100-
RootNode<'a, QueryT, MutationT, SubscriptionT, DefaultScalarValue>
99+
impl<QueryT, MutationT, SubscriptionT>
100+
RootNode<'_, QueryT, MutationT, SubscriptionT, DefaultScalarValue>
101101
where
102102
QueryT: GraphQLType<DefaultScalarValue, TypeInfo = ()>,
103103
MutationT: GraphQLType<DefaultScalarValue, TypeInfo = ()>,
@@ -683,7 +683,7 @@ impl fmt::Display for DirectiveLocation {
683683
}
684684
}
685685

686-
impl<'a, S> fmt::Display for TypeType<'a, S> {
686+
impl<S> fmt::Display for TypeType<'_, S> {
687687
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
688688
match self {
689689
Self::Concrete(t) => f.write_str(t.name().unwrap()),

juniper/src/schema/schema.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ use crate::schema::{
1717
model::{DirectiveLocation, DirectiveType, RootNode, SchemaType, TypeType},
1818
};
1919

20-
impl<'a, S, QueryT, MutationT, SubscriptionT> GraphQLType<S>
21-
for RootNode<'a, QueryT, MutationT, SubscriptionT, S>
20+
impl<S, QueryT, MutationT, SubscriptionT> GraphQLType<S>
21+
for RootNode<'_, QueryT, MutationT, SubscriptionT, S>
2222
where
2323
S: ScalarValue,
2424
QueryT: GraphQLType<S>,
@@ -37,8 +37,8 @@ where
3737
}
3838
}
3939

40-
impl<'a, S, QueryT, MutationT, SubscriptionT> GraphQLValue<S>
41-
for RootNode<'a, QueryT, MutationT, SubscriptionT, S>
40+
impl<S, QueryT, MutationT, SubscriptionT> GraphQLValue<S>
41+
for RootNode<'_, QueryT, MutationT, SubscriptionT, S>
4242
where
4343
S: ScalarValue,
4444
QueryT: GraphQLType<S>,

0 commit comments

Comments
 (0)