Skip to content

Commit 3b72bba

Browse files
committed
Resolove warning in test code
1 parent f012cdb commit 3b72bba

10 files changed

+18
-3
lines changed

tests/custom_scalars.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ type NetworkAddress = Ipv4Addr;
1616
query_path = "tests/custom_scalars/query.graphql",
1717
schema_path = "tests/custom_scalars/schema.graphql"
1818
)]
19+
#[allow(dead_code)]
1920
struct CustomScalarsQuery;
2021

2122
#[test]

tests/deprecation.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ extern crate serde_derive;
1010
query_path = "tests/deprecation/query.graphql",
1111
deprecated = "allow",
1212
)]
13-
#[allow(unused_variables)]
13+
#[allow(dead_code)]
1414
struct AllowDeprecation;
1515

1616
#[derive(GraphQLQuery)]
@@ -19,16 +19,18 @@ struct AllowDeprecation;
1919
query_path = "tests/deprecation/query.graphql",
2020
deprecated = "deny",
2121
)]
22-
#[allow(unused_variables)]
22+
#[allow(dead_code)]
2323
struct DenyDeprecation;
2424

25+
#[allow(deprecated)]
2526
#[derive(GraphQLQuery)]
2627
#[graphql(
2728
schema_path = "tests/deprecation/schema.graphql",
2829
query_path = "tests/deprecation/query.graphql",
2930
deprecated = "warn",
3031
)]
31-
#[allow(unused_variables)]
32+
#[allow(dead_code)]
33+
#[allow(deprecated)]
3234
struct WarnDeprecation;
3335

3436
#[test]

tests/input_object_variables.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ extern crate serde_json;
1111
schema_path = "tests/input_object_variables/input_object_variables_schema.graphql",
1212
response_derives = "Debug",
1313
)]
14+
#[allow(dead_code)]
1415
struct InputObjectVariablesQuery;
1516

1617
#[test]
@@ -36,6 +37,7 @@ type Email = String;
3637
schema_path = "tests/input_object_variables/input_object_variables_schema.graphql",
3738
response_derives = "Debug",
3839
)]
40+
#[allow(dead_code)]
3941
struct DefaultInputObjectVariablesQuery;
4042

4143
#[test]

tests/interfaces.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const RESPONSE: &'static str = include_str!("interfaces/interface_response.json"
1313
schema_path = "tests/interfaces/interface_schema.graphql",
1414
response_derives = "Debug, PartialEq",
1515
)]
16+
#[allow(dead_code)]
1617
struct InterfaceQuery;
1718

1819
#[test]
@@ -60,6 +61,7 @@ fn interface_deserialization() {
6061
schema_path = "tests/interfaces/interface_schema.graphql",
6162
response_derives = "Debug",
6263
)]
64+
#[allow(dead_code)]
6365
struct InterfaceNotOnEverythingQuery;
6466

6567
const RESPONSE_NOT_ON_EVERYTHING: &'static str =

tests/introspection.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ extern crate serde_json;
1111
schema_path = "tests/introspection/introspection_schema.graphql",
1212
response_derives = "Debug,PartialEq"
1313
)]
14+
#[allow(dead_code)]
1415
struct IntrospectionQuery;
1516

1617
#[test]

tests/more_derives.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ extern crate serde_derive;
1010
query_path = "tests/more_derives/query.graphql",
1111
response_derives = "Debug, PartialEq, PartialOrd",
1212
)]
13+
#[allow(dead_code)]
1314
struct MoreDerives;
1415

1516
#[test]

tests/operation_selection.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ extern crate serde_json;
1111
schema_path = "tests/operation_selection/schema.graphql",
1212
response_derives = "Debug",
1313
)]
14+
#[allow(dead_code)]
1415
struct Heights;
1516

1617
#[derive(GraphQLQuery)]
@@ -19,6 +20,7 @@ struct Heights;
1920
schema_path = "tests/operation_selection/schema.graphql",
2021
response_derives = "Debug",
2122
)]
23+
#[allow(dead_code)]
2224
struct Echo;
2325

2426
const HEIGHTS_RESPONSE: &'static str = r##"{"mountainHeight": 224, "buildingHeight": 12}"##;

tests/scalar_variables.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ extern crate serde_json;
1010
query_path = "tests/scalar_variables/scalar_variables_query.graphql",
1111
schema_path = "tests/scalar_variables/scalar_variables_schema.graphql"
1212
)]
13+
#[allow(dead_code)]
1314
struct ScalarVariablesQuery;
1415

1516
#[test]
@@ -25,6 +26,7 @@ fn scalar_variables_query_variables_struct() {
2526
query_path = "tests/scalar_variables/scalar_variables_query_defaults.graphql",
2627
schema_path = "tests/scalar_variables/scalar_variables_schema.graphql"
2728
)]
29+
#[allow(dead_code)]
2830
struct DefaultScalarVariablesQuery;
2931

3032
#[test]

tests/subscriptions.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ const RESPONSE: &str = include_str!("subscription/subscription_query_response.js
2222
query_path = "tests/subscription/subscription_query.graphql",
2323
response_derives = "Debug, PartialEq"
2424
)]
25+
#[allow(dead_code)]
2526
struct SubscriptionQuery;
2627

2728
#[test]

tests/union_query.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const RESPONSE: &'static str = include_str!("unions/union_query_response.json");
1313
schema_path = "tests/unions/union_schema.graphql",
1414
response_derives = "PartialEq, Debug",
1515
)]
16+
#[allow(dead_code)]
1617
struct UnionQuery;
1718

1819
#[test]

0 commit comments

Comments
 (0)