Skip to content

Commit 74584fc

Browse files
committed
Run cargo fix --edition take 2
1 parent f211809 commit 74584fc

33 files changed

+124
-124
lines changed

wundergraph/src/filter/build_filter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ where
1818
}
1919

2020
impl<'a, T, DB> BuildFilter<DB>
21-
for Box<BoxableFilter<T, DB, SqlType = ::diesel::sql_types::Bool> + 'a>
21+
for Box<dyn BoxableFilter<T, DB, SqlType = ::diesel::sql_types::Bool> + 'a>
2222
where
2323
DB: Backend,
2424
{

wundergraph/src/filter/collector/and.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ use std::fmt::{self, Debug};
1010

1111
/// A filter collected that combines all given filters using `AND`
1212
pub struct AndCollector<'a, T, DB>(
13-
Option<Box<BoxableFilter<T, DB, SqlType = ::diesel::sql_types::Bool> + 'a>>,
13+
Option<Box<dyn BoxableFilter<T, DB, SqlType = ::diesel::sql_types::Bool> + 'a>>,
1414
);
1515

1616
impl<'a, T, DB> Debug for AndCollector<'a, T, DB>
1717
where
1818
DB: Backend,
1919
DB::QueryBuilder: Default,
2020
{
21-
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
21+
fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
2222
fmt.debug_tuple("AndCollector")
2323
.field(&self.0.as_ref().map(|q| ::diesel::debug_query(q)))
2424
.finish()
@@ -56,7 +56,7 @@ impl<'a, T, DB> BuildFilter<DB> for AndCollector<'a, T, DB>
5656
where
5757
DB: Backend,
5858
{
59-
type Ret = Box<BoxableFilter<T, DB, SqlType = ::diesel::sql_types::Bool> + 'a>;
59+
type Ret = Box<dyn BoxableFilter<T, DB, SqlType = ::diesel::sql_types::Bool> + 'a>;
6060

6161
fn into_filter(self) -> Option<Self::Ret> {
6262
self.0

wundergraph/src/filter/collector/or.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ use std::fmt::{self, Debug};
1010

1111
/// A filter collected that combines all given filters using `or`
1212
pub struct OrCollector<'a, T, DB>(
13-
Option<Box<BoxableFilter<T, DB, SqlType = ::diesel::sql_types::Bool> + 'a>>,
13+
Option<Box<dyn BoxableFilter<T, DB, SqlType = ::diesel::sql_types::Bool> + 'a>>,
1414
);
1515

1616
impl<'a, T, DB> Debug for OrCollector<'a, T, DB>
1717
where
1818
DB: Backend,
1919
DB::QueryBuilder: Default,
2020
{
21-
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
21+
fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
2222
fmt.debug_tuple("OrCollector")
2323
.field(&self.0.as_ref().map(|q| ::diesel::debug_query(q)))
2424
.finish()
@@ -56,7 +56,7 @@ impl<'a, T, DB> BuildFilter<DB> for OrCollector<'a, T, DB>
5656
where
5757
DB: Backend,
5858
{
59-
type Ret = Box<BoxableFilter<T, DB, SqlType = ::diesel::sql_types::Bool> + 'a>;
59+
type Ret = Box<dyn BoxableFilter<T, DB, SqlType = ::diesel::sql_types::Bool> + 'a>;
6060

6161
fn into_filter(self) -> Option<Self::Ret> {
6262
self.0

wundergraph/src/filter/common_filter/eq.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ where
4141
operators::Eq<C, <T as AsExpression<C::SqlType>>::Expression>:
4242
AppearsOnTable<C::Table, SqlType = Bool>,
4343
{
44-
type Ret = Box<BoxableFilter<C::Table, DB, SqlType = Bool>>;
44+
type Ret = Box<dyn BoxableFilter<C::Table, DB, SqlType = Bool>>;
4545

4646
fn into_filter(self) -> Option<Self::Ret> {
4747
let Eq(filter, _) = self;

wundergraph/src/filter/common_filter/eq_any.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ where
4242
In<C, Many<<T as AsExpression<C::SqlType>>::Expression>>:
4343
AppearsOnTable<C::Table, SqlType = Bool>,
4444
{
45-
type Ret = Box<BoxableFilter<C::Table, DB, SqlType = Bool>>;
45+
type Ret = Box<dyn BoxableFilter<C::Table, DB, SqlType = Bool>>;
4646

4747
fn into_filter(self) -> Option<Self::Ret> {
4848
let EqAny(filter, _) = self;

wundergraph/src/filter/common_filter/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ where
102102
})
103103
}
104104

105-
fn from_inner_look_ahead(obj: &[(&str, LookAheadValue<WundergraphScalarValue>)]) -> Self {
105+
fn from_inner_look_ahead(obj: &[(&str, LookAheadValue<'_, WundergraphScalarValue>)]) -> Self {
106106
let eq = obj
107107
.iter()
108108
.find(|o| o.0 == "eq")
@@ -221,7 +221,7 @@ where
221221
C: Column,
222222
Self: InnerFilter,
223223
{
224-
fn from_look_ahead(a: &LookAheadValue<WundergraphScalarValue>) -> Option<Self> {
224+
fn from_look_ahead(a: &LookAheadValue<'_, WundergraphScalarValue>) -> Option<Self> {
225225
if let LookAheadValue::Object(ref obj) = *a {
226226
Some(Self::from_inner_look_ahead(obj))
227227
} else {
@@ -250,7 +250,7 @@ where
250250
In<C, Many<<T::RawValue as AsExpression<C::SqlType>>::Expression>>:
251251
AppearsOnTable<C::Table, SqlType = Bool>,
252252
{
253-
type Ret = Box<BoxableFilter<C::Table, DB, SqlType = Bool>>;
253+
type Ret = Box<dyn BoxableFilter<C::Table, DB, SqlType = Bool>>;
254254

255255
fn into_filter(self) -> Option<Self::Ret> {
256256
let mut combinator = AndCollector::default();

wundergraph/src/filter/common_filter/not_eq.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ where
4141
operators::NotEq<C, <T as AsExpression<C::SqlType>>::Expression>:
4242
AppearsOnTable<C::Table, SqlType = Bool>,
4343
{
44-
type Ret = Box<BoxableFilter<C::Table, DB, SqlType = Bool>>;
44+
type Ret = Box<dyn BoxableFilter<C::Table, DB, SqlType = Bool>>;
4545

4646
fn into_filter(self) -> Option<Self::Ret> {
4747
let NotEq(filter, _) = self;

wundergraph/src/filter/filter_helper.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ macro_rules! __impl_build_filter_for_tuples {
153153
Back::QueryBuilder: Default,
154154

155155
{
156-
type Ret = Box<BoxableFilter<Loading::Table, Back, SqlType = Bool>>;
156+
type Ret = Box<dyn BoxableFilter<Loading::Table, Back, SqlType = Bool>>;
157157

158158
fn into_filter(self) -> Option<Self::Ret> {
159159
use crate::filter::collector::{AndCollector, FilterCollector};
@@ -200,7 +200,7 @@ macro_rules! __impl_build_filter_for_tuples {
200200
}
201201

202202
fn from_inner_look_ahead(
203-
objs: &[(&str, LookAheadValue<WundergraphScalarValue>)]
203+
objs: &[(&str, LookAheadValue<'_, WundergraphScalarValue>)]
204204
) -> Self {
205205
use crate::query_helper::placeholder::WundergraphFieldList;
206206
let mut values = ($(Option::<$T>::None,)*);

wundergraph/src/filter/inner_filter.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pub trait InnerFilter: Sized + Nameable {
2121
v: IndexMap<&str, &InputValue<WundergraphScalarValue>>,
2222
) -> Option<Self>;
2323
/// Create the given filter from a graphql lookahead value
24-
fn from_inner_look_ahead(v: &[(&str, LookAheadValue<WundergraphScalarValue>)]) -> Self;
24+
fn from_inner_look_ahead(v: &[(&str, LookAheadValue<'_, WundergraphScalarValue>)]) -> Self;
2525
/// Covert the given filter into a graphql value
2626
fn to_inner_input_value(&self, v: &mut IndexMap<&str, InputValue<WundergraphScalarValue>>);
2727
/// Register all fields of the the filter in a given graphql schema
@@ -42,7 +42,7 @@ impl InnerFilter for () {
4242
) -> Option<Self> {
4343
Some(())
4444
}
45-
fn from_inner_look_ahead(_v: &[(&str, LookAheadValue<WundergraphScalarValue>)]) -> Self {
45+
fn from_inner_look_ahead(_v: &[(&str, LookAheadValue<'_, WundergraphScalarValue>)]) -> Self {
4646
()
4747
}
4848
fn to_inner_input_value(&self, _v: &mut IndexMap<&str, InputValue<WundergraphScalarValue>>) {}

wundergraph/src/filter/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ impl<F, T> FromLookAheadValue for Filter<F, T>
154154
where
155155
F: InnerFilter,
156156
{
157-
fn from_look_ahead(v: &LookAheadValue<WundergraphScalarValue>) -> Option<Self> {
157+
fn from_look_ahead(v: &LookAheadValue<'_, WundergraphScalarValue>) -> Option<Self> {
158158
if let LookAheadValue::Object(ref obj) = *v {
159159
Some(Self::from_inner_look_ahead(obj))
160160
} else {
@@ -218,7 +218,7 @@ where
218218
<Self as BuildFilter<DB>>::Ret: AppearsOnTable<T> + QueryFragment<DB> + 'a,
219219
{
220220
if let Some(f) = self.into_filter() {
221-
q = <BoxedSelectStatement<_, _, _> as QueryDsl>::filter(q, f);
221+
q = <BoxedSelectStatement<'_, _, _, _> as QueryDsl>::filter(q, f);
222222
}
223223
q
224224
}
@@ -257,7 +257,7 @@ where
257257
})
258258
}
259259

260-
fn from_inner_look_ahead(objs: &[(&str, LookAheadValue<WundergraphScalarValue>)]) -> Self {
260+
fn from_inner_look_ahead(objs: &[(&str, LookAheadValue<'_, WundergraphScalarValue>)]) -> Self {
261261
let and = objs
262262
.iter()
263263
.find(|o| o.0 == "and")

0 commit comments

Comments
 (0)