Skip to content

Commit 40df869

Browse files
authored
Merge pull request #15 from tomhoule/rustfmt-on-travis
Add rustfmt step to CI
2 parents d25220c + 75a7554 commit 40df869

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ rust:
44
- beta
55
- nightly
66
cache: cargo
7+
before_script:
8+
- if [ "$TRAVIS_RUST_VERSION" = "nightly" ]; then (rustup component add rustfmt-preview) fi
79
script:
10+
- if [ "$TRAVIS_RUST_VERSION" = "nightly" ]; then (cargo fmt --all -- --check) fi
811
- cargo test --all
912
- cargo build --manifest-path=./examples/github/Cargo.toml
1013
- cargo build --manifest-path=./graphql_client_cli/Cargo.toml

graphql_query_derive/src/unions.rs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,13 @@ impl GqlUnion {
7171
&new_prefix,
7272
)
7373
});
74-
let field_interface =
75-
query_context.schema.interfaces.get(&frag.on).map(|_f| {
76-
query_context.maybe_expand_field(
77-
&frag.on,
78-
&frag.fields,
79-
&new_prefix,
80-
)
81-
});
74+
let field_interface = query_context.schema.interfaces.get(&frag.on).map(|_f| {
75+
query_context.maybe_expand_field(
76+
&frag.on,
77+
&frag.fields,
78+
&new_prefix
79+
)
80+
});
8281
// nested unions, is that even a thing?
8382
let field_union_type = query_context.schema.unions.get(&frag.on).map(|_f| {
8483
query_context.maybe_expand_field(&frag.on, &frag.fields, &new_prefix)

0 commit comments

Comments
 (0)