Skip to content

Commit 24da4fb

Browse files
committed
cargo fix --edition
1 parent 8e9d696 commit 24da4fb

File tree

23 files changed

+105
-101
lines changed

23 files changed

+105
-101
lines changed

graphql_client/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ repository = "https://github.com/graphql-rust/graphql-client"
77
license = "Apache-2.0 OR MIT"
88
keywords = ["graphql", "api", "web", "webassembly", "wasm"]
99
categories = ["network-programming", "web-programming", "wasm"]
10+
edition = "2018"
1011

1112
[dependencies]
1213
failure = "0.1"

graphql_client/tests/type_refining_fragments.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ fn type_refining_fragment_on_union() {
5252

5353
#[test]
5454
fn type_refining_fragment_on_interface() {
55-
use query_on_interface::*;
55+
use crate::query_on_interface::*;
5656

5757
const RESPONSE: &'static str = include_str!("interfaces/interface_response.json");
5858

graphql_client_cli/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ version = "0.7.0"
55
authors = ["Tom Houlé <[email protected]>"]
66
license = "Apache-2.0 OR MIT"
77
repository = "https://github.com/graphql-rust/graphql-client"
8+
edition = "2018"
89

910
[[bin]]
1011
name = "graphql-client"

graphql_client_codegen/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ authors = ["Tom Houlé <[email protected]>"]
55
description = "Utility crate for graphql_client"
66
license = "Apache-2.0 OR MIT"
77
repository = "https://github.com/graphql-rust/graphql-client"
8+
edition = "2018"
89

910
[dependencies]
1011
failure = "0.1"

graphql_client_codegen/src/codegen.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
use failure;
2-
use fragments::GqlFragment;
2+
use crate::fragments::GqlFragment;
33
use graphql_parser::query;
4-
use operations::Operation;
4+
use crate::operations::Operation;
55
use proc_macro2::TokenStream;
6-
use query::QueryContext;
7-
use schema;
8-
use selection::Selection;
6+
use crate::query::QueryContext;
7+
use crate::schema;
8+
use crate::selection::Selection;
99

1010
/// Selects the first operation matching `struct_name`. Returns `None` when the query document defines no operation, or when the selected operation does not match any defined operation.
1111
pub(crate) fn select_operation<'query>(
@@ -36,7 +36,7 @@ pub(crate) fn response_for_query(
3636
schema: &schema::Schema,
3737
query: &query::Document,
3838
operation: &Operation,
39-
options: &::GraphQLClientCodegenOptions,
39+
options: &crate::GraphQLClientCodegenOptions,
4040
) -> Result<TokenStream, failure::Error> {
4141
let mut context = QueryContext::new(schema, options.deprecation_strategy());
4242

@@ -88,7 +88,7 @@ pub(crate) fn response_for_query(
8888
if operation.is_subscription() && selection.len() > 1 {
8989
Err(format_err!(
9090
"{}",
91-
::constants::MULTIPLE_SUBSCRIPTION_FIELDS_ERROR
91+
crate::constants::MULTIPLE_SUBSCRIPTION_FIELDS_ERROR
9292
))?
9393
}
9494

graphql_client_codegen/src/constants.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
use deprecation::DeprecationStatus;
2-
use field_type::FieldType;
3-
use objects::GqlObjectField;
1+
use crate::deprecation::DeprecationStatus;
2+
use crate::field_type::FieldType;
3+
use crate::objects::GqlObjectField;
44

55
pub(crate) const TYPENAME_FIELD: &str = "__typename";
66

graphql_client_codegen/src/enums.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pub struct GqlEnum<'schema> {
1818
}
1919

2020
impl<'schema> GqlEnum<'schema> {
21-
pub(crate) fn to_rust(&self, query_context: &::query::QueryContext) -> TokenStream {
21+
pub(crate) fn to_rust(&self, query_context: &crate::query::QueryContext) -> TokenStream {
2222
let derives = query_context.response_enum_derives();
2323
let variant_names: Vec<TokenStream> = self
2424
.variants

graphql_client_codegen/src/field_type.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
use enums::ENUMS_PREFIX;
1+
use crate::enums::ENUMS_PREFIX;
22
use graphql_parser;
3-
use introspection_response;
3+
use crate::introspection_response;
44
use proc_macro2::{Ident, Span, TokenStream};
5-
use query::QueryContext;
6-
use schema::DEFAULT_SCALARS;
5+
use crate::query::QueryContext;
6+
use crate::schema::DEFAULT_SCALARS;
77

88
#[derive(Clone, Debug, PartialEq, Hash)]
99
pub enum FieldType<'a> {
@@ -118,7 +118,7 @@ fn from_schema_type_inner(inner: &graphql_parser::schema::Type, non_null: bool)
118118
}
119119

120120
fn from_json_type_inner(inner: &introspection_response::TypeRef, non_null: bool) -> FieldType {
121-
use introspection_response::*;
121+
use crate::introspection_response::*;
122122

123123
match inner.kind {
124124
Some(__TypeKind::NON_NULL) => from_json_type_inner(
@@ -168,7 +168,7 @@ impl<'a> ::std::convert::From<&'a introspection_response::InputValueType> for Fi
168168
mod tests {
169169
use super::*;
170170
use graphql_parser::schema::Type as GqlParserType;
171-
use introspection_response::{FullTypeFieldsType, TypeRef, __TypeKind};
171+
use crate::introspection_response::{FullTypeFieldsType, TypeRef, __TypeKind};
172172

173173
#[test]
174174
fn field_type_from_graphql_parser_schema_type_works() {

graphql_client_codegen/src/fragments.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use proc_macro2::TokenStream;
2-
use query::QueryContext;
3-
use selection::Selection;
2+
use crate::query::QueryContext;
3+
use crate::selection::Selection;
44
use std::cell::Cell;
55

66
/// Represents which type a fragment is defined on. This is the type mentioned in the fragment's `on` clause.

graphql_client_codegen/src/generated_module.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ use proc_macro2::{Ident, Span, TokenStream};
44

55
/// This struct contains the parameters necessary to generate code for a given operation.
66
pub(crate) struct GeneratedModule<'a> {
7-
pub operation: &'a ::operations::Operation<'a>,
7+
pub operation: &'a crate::operations::Operation<'a>,
88
pub query_string: &'a str,
99
pub query_document: &'a graphql_parser::query::Document,
10-
pub schema: &'a ::schema::Schema<'a>,
10+
pub schema: &'a crate::schema::Schema<'a>,
1111
pub options: &'a crate::GraphQLClientCodegenOptions,
1212
}
1313

1414
impl<'a> GeneratedModule<'a> {
1515
/// Generate the items for the variables and the response that will go inside the module.
1616
fn build_impls(&self) -> Result<TokenStream, failure::Error> {
17-
Ok(::codegen::response_for_query(
17+
Ok(crate::codegen::response_for_query(
1818
&self.schema,
1919
&self.query_document,
2020
&self.operation,

0 commit comments

Comments
 (0)