Skip to content

Commit

Permalink
Fix CI (graphql-rust#884)
Browse files Browse the repository at this point in the history
* fix some CI errors

* Remove `-C link-dead-code` in tests

Seems to break things on Windows.
  • Loading branch information
trevyn authored Feb 26, 2021
1 parent 474cd19 commit d5458f4
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ jobs:

- name: Build and run tests
env:
RUSTFLAGS: "-C link-dead-code"
CARGO_MAKE_RUN_CODECOV: true
run: |
cargo make workspace-ci-flow --no-workspace
Expand Down
10 changes: 8 additions & 2 deletions juniper/src/schema/meta.rs
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,10 @@ impl<'a, S> MetaType<'a, S> {
///
/// Objects, interfaces, and unions are composite.
pub fn is_composite(&self) -> bool {
matches!(*self, MetaType::Object(_) | MetaType::Interface(_) | MetaType::Union(_))
matches!(
*self,
MetaType::Object(_) | MetaType::Interface(_) | MetaType::Union(_)
)
}

/// Returns true if the type can occur in leaf positions in queries
Expand All @@ -369,7 +372,10 @@ impl<'a, S> MetaType<'a, S> {
///
/// Only scalars, enums, and input objects are input types.
pub fn is_input(&self) -> bool {
matches!(*self, MetaType::Scalar(_) | MetaType::Enum(_) | MetaType::InputObject(_))
matches!(
*self,
MetaType::Scalar(_) | MetaType::Enum(_) | MetaType::InputObject(_)
)
}

/// Returns true if the type is built-in to GraphQL.
Expand Down
4 changes: 2 additions & 2 deletions juniper/src/types/async_await.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,11 +231,11 @@ where
}

let meta_field = meta_type.field_by_name(f.name.item).unwrap_or_else(|| {
panic!(format!(
panic!(
"Field {} not found on type {:?}",
f.name.item,
meta_type.name()
))
)
});

let exec_vars = executor.variables();
Expand Down
4 changes: 2 additions & 2 deletions juniper/src/types/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -449,11 +449,11 @@ where
}

let meta_field = meta_type.field_by_name(f.name.item).unwrap_or_else(|| {
panic!(format!(
panic!(
"Field {} not found on type {:?}",
f.name.item,
meta_type.name()
))
)
});

let exec_vars = executor.variables();
Expand Down

0 comments on commit d5458f4

Please sign in to comment.