Skip to content

Commit 2e2ccf3

Browse files
committed
Run rustfmt
1 parent 4fc6b64 commit 2e2ccf3

File tree

23 files changed

+38
-54
lines changed

23 files changed

+38
-54
lines changed

wundergraph/bench/queries.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ const QUERIES: &[&str] = &[
7474
}
7575
}
7676
}"#,
77-
r#"query artists_collaboration {
77+
r#"query artists_collaboration {
7878
Artists(filter: {albums: {tracks: {composer: {eq: "Ludwig van Beethoven"}}}})
7979
{
8080
artist_id

wundergraph/src/context.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ use diesel::Connection;
22

33
/// A trait for types that could be used as context types for wundergraph
44
pub trait WundergraphContext {
5-
65
/// The underlying connection type
76
type Connection: Connection + 'static;
87

wundergraph/src/helper/tuple.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ pub trait IsPrimaryKeyIndex {
1515
/// let _a: <(i32, &str, f64) as TupleIndex<TupleIndex1>>::Value = "foo";
1616
/// ```
1717
pub trait TupleIndex<N> {
18-
1918
/// The type of the indexed tuple value
2019
type Value;
2120

@@ -28,7 +27,6 @@ pub trait TupleIndex<N> {
2827
/// `Self` represents the existing tuple, `Other` the tuple that should be
2928
/// appended
3029
pub trait ConcatTuples<Other> {
31-
3230
/// The resulting tuple type
3331
type Out;
3432
}

wundergraph/src/macros/query.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ macro_rules! __expand_limit {
3232
};
3333
}
3434

35-
3635
#[doc(hidden)]
3736
#[macro_export]
3837
macro_rules! __expand_offset {

wundergraph/src/query_builder/mutations/insert/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ pub trait HandleInsert<L, I, DB, Ctx> {
103103
/// A default implementation is provided for all types implementing
104104
/// `diesel::Insertable`
105105
pub trait HandleBatchInsert<L, I, DB, Ctx> {
106-
107106
/// Actual function called to insert a batch of database entity
108107
fn handle_batch_insert(
109108
selection: Option<&'_ [Selection<'_, WundergraphScalarValue>]>,

wundergraph/src/query_builder/mutations/insert/pg.rs

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,7 @@ where
2626
T::FromClause: QueryFragment<Pg>,
2727
L: LoadingHandler<Pg, Ctx, Table = T> + 'static,
2828
L::Columns: BuildOrder<T, Pg>
29-
+ BuildSelect<
30-
T,
31-
Pg,
32-
SqlTypeOfPlaceholder<L::FieldList, Pg, L::PrimaryKeyIndex, T, Ctx>,
33-
>,
29+
+ BuildSelect<T, Pg, SqlTypeOfPlaceholder<L::FieldList, Pg, L::PrimaryKeyIndex, T, Ctx>>,
3430
Ctx: WundergraphContext + QueryModifier<L, Pg>,
3531
Ctx::Connection: Connection<Backend = Pg>,
3632
L::FieldList: WundergraphFieldList<Pg, L::PrimaryKeyIndex, T, Ctx>,
@@ -42,9 +38,8 @@ where
4238
Pg,
4339
Output = BoxedSelectStatement<'static, SqlTypeOf<<T as Table>::AllColumns>, T, Pg>,
4440
>,
45-
<Ctx::Connection as Connection>::Backend:
46-
HasSqlType<SqlTypeOf<T::PrimaryKey>>
47-
+ HasSqlType<SqlTypeOfPlaceholder<L::FieldList, Pg, L::PrimaryKeyIndex, T, Ctx>>,
41+
<Ctx::Connection as Connection>::Backend: HasSqlType<SqlTypeOf<T::PrimaryKey>>
42+
+ HasSqlType<SqlTypeOfPlaceholder<L::FieldList, Pg, L::PrimaryKeyIndex, T, Ctx>>,
4843
<L::Filter as BuildFilter<Pg>>::Ret: AppearsOnTable<T>,
4944
T::PrimaryKey: EqAll<Id>,
5045
&'static L: Identifiable,
@@ -84,11 +79,7 @@ where
8479
T::FromClause: QueryFragment<Pg>,
8580
L: LoadingHandler<Pg, Ctx, Table = T> + 'static,
8681
L::Columns: BuildOrder<T, Pg>
87-
+ BuildSelect<
88-
T,
89-
Pg,
90-
SqlTypeOfPlaceholder<L::FieldList, Pg, L::PrimaryKeyIndex, T, Ctx>,
91-
>,
82+
+ BuildSelect<T, Pg, SqlTypeOfPlaceholder<L::FieldList, Pg, L::PrimaryKeyIndex, T, Ctx>>,
9283
Ctx: WundergraphContext + QueryModifier<L, Pg>,
9384
Ctx::Connection: Connection<Backend = Pg>,
9485
L::FieldList: WundergraphFieldList<Pg, L::PrimaryKeyIndex, T, Ctx>,
@@ -100,9 +91,8 @@ where
10091
Pg,
10192
Output = BoxedSelectStatement<'static, SqlTypeOf<<T as Table>::AllColumns>, T, Pg>,
10293
>,
103-
<Ctx::Connection as Connection>::Backend:
104-
HasSqlType<SqlTypeOf<T::PrimaryKey>>
105-
+ HasSqlType<SqlTypeOfPlaceholder<L::FieldList, Pg, L::PrimaryKeyIndex, T, Ctx>>,
94+
<Ctx::Connection as Connection>::Backend: HasSqlType<SqlTypeOf<T::PrimaryKey>>
95+
+ HasSqlType<SqlTypeOfPlaceholder<L::FieldList, Pg, L::PrimaryKeyIndex, T, Ctx>>,
10696
<L::Filter as BuildFilter<Pg>>::Ret: AppearsOnTable<T>,
10797
T::PrimaryKey: EqAll<Id>,
10898
&'static L: Identifiable,

wundergraph/src/query_builder/mutations/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,6 @@ pub use self::update::HandleUpdate;
8181
#[doc(hidden)]
8282
pub use self::delete::handle_delete;
8383
#[doc(hidden)]
84-
pub use self::insert::{handle_insert, handle_batch_insert};
84+
pub use self::insert::{handle_batch_insert, handle_insert};
8585
#[doc(hidden)]
8686
pub use self::update::handle_update;

wundergraph/src/query_builder/mutations/update.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,7 @@ where
7979
T::FromClause: QueryFragment<DB>,
8080
L: LoadingHandler<DB, Ctx, Table = T>,
8181
L::Columns: BuildOrder<T, DB>
82-
+ BuildSelect<
83-
T,
84-
DB,
85-
SqlTypeOfPlaceholder<L::FieldList, DB, L::PrimaryKeyIndex, T, Ctx>,
86-
>,
82+
+ BuildSelect<T, DB, SqlTypeOfPlaceholder<L::FieldList, DB, L::PrimaryKeyIndex, T, Ctx>>,
8783
Ctx: WundergraphContext + QueryModifier<L, DB>,
8884
Ctx::Connection: Connection<Backend = DB>,
8985
L::FieldList: WundergraphFieldList<DB, L::PrimaryKeyIndex, T, Ctx>,

wundergraph/src/query_builder/selection/fields/field_list.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
use super::{FieldListExtractor, NonTableFieldExtractor, WundergraphResolveAssociations};
22
use crate::context::WundergraphContext;
3+
use crate::error::Result;
4+
use crate::helper::tuple::TupleIndex;
5+
use crate::query_builder::selection::query_resolver::WundergraphResolvePlaceHolderList;
36
use crate::query_builder::types::placeholder::PlaceHolderMarker;
47
use crate::query_builder::types::WundergraphValue;
5-
use crate::query_builder::selection::query_resolver::WundergraphResolvePlaceHolderList;
6-
use crate::helper::tuple::TupleIndex;
78
use crate::scalar::WundergraphScalarValue;
8-
use crate::error::Result;
99
use diesel::backend::Backend;
1010
use diesel::{Connection, Queryable};
1111
use juniper::{Executor, Selection};

wundergraph/src/query_builder/selection/filter/common_filter/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use super::collector::{AndCollector, FilterCollector};
33
use super::filter_value::FilterValue;
44
use super::inner_filter::InnerFilter;
55
use crate::diesel_ext::BoxableFilter;
6-
use crate::juniper_ext::{NameBuilder, Nameable, FromLookAheadValue};
6+
use crate::juniper_ext::{FromLookAheadValue, NameBuilder, Nameable};
77
use crate::scalar::WundergraphScalarValue;
88
use diesel::backend::Backend;
99
use diesel::expression::array_comparison::{In, Many};

0 commit comments

Comments
 (0)