Skip to content

Commit 18f7853

Browse files
author
daniel.eades
committed
remove wildcard imports (clippy::wildcard_imports)
1 parent 5969b2d commit 18f7853

File tree

10 files changed

+22
-26
lines changed

10 files changed

+22
-26
lines changed

examples/github/examples/github.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
use ::reqwest::blocking::Client;
2-
use anyhow::*;
2+
use anyhow::{format_err, Ok, Result};
33
use clap::Parser;
44
use graphql_client::{reqwest::post_graphql_blocking as post_graphql, GraphQLQuery};
5-
use log::*;
6-
use prettytable::*;
5+
use log::info;
6+
use prettytable::row;
77

88
#[allow(clippy::upper_case_acronyms)]
99
type URI = String;

examples/hasura/examples/hasura.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use ::reqwest::blocking::Client;
22
use graphql_client::{reqwest::post_graphql_blocking as post_graphql, GraphQLQuery};
3-
use log::*;
4-
use prettytable::*;
3+
use log::{error, info};
4+
use prettytable::row;
55

66
type Bpchar = String;
77
type Timestamptz = String;
@@ -16,7 +16,7 @@ type Timestamptz = String;
1616
struct UpsertIssue;
1717

1818
fn main() -> Result<(), anyhow::Error> {
19-
use upsert_issue::{IssuesUpdateColumn::*, *};
19+
use upsert_issue::{IssuesInsertInput, IssuesUpdateColumn::*, Variables};
2020
env_logger::init();
2121

2222
let v = Variables {

examples/web/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use graphql_client::{reqwest::post_graphql, GraphQLQuery};
2-
use lazy_static::*;
2+
use lazy_static::lazy_static;
33
use std::cell::RefCell;
44
use std::sync::Mutex;
55
use wasm_bindgen::prelude::*;

graphql_client_codegen/src/codegen.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,18 @@ mod selection;
44
mod shared;
55

66
use crate::{
7-
query::*,
7+
query::{
8+
all_used_types, operation_has_no_variables, walk_operation_variables, BoundQuery,
9+
OperationId, ResolvedVariable, UsedTypes,
10+
},
811
schema::{InputId, TypeId},
912
type_qualifiers::GraphqlTypeQualifier,
1013
GeneralError, GraphQLClientCodegenOptions,
1114
};
1215
use heck::ToSnakeCase;
1316
use proc_macro2::{Ident, Span, TokenStream};
1417
use quote::{quote, ToTokens};
15-
use selection::*;
18+
use selection::render_response_data_fields;
1619
use std::collections::BTreeMap;
1720

1821
/// The main code generation function.

graphql_client_codegen/src/codegen/selection.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use crate::{
1414
type_qualifiers::GraphqlTypeQualifier,
1515
GraphQLClientCodegenOptions,
1616
};
17-
use heck::*;
17+
use heck::ToSnakeCase;
1818
use proc_macro2::{Ident, Span, TokenStream};
1919
use quote::{quote, ToTokens};
2020
use std::borrow::Cow;

graphql_client_codegen/src/generated_module.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
use crate::{
2-
codegen_options::*,
2+
codegen_options::CodegenMode,
33
query::{BoundQuery, OperationId},
44
BoxError,
55
};
6-
use heck::*;
6+
use heck::ToSnakeCase;
77
use proc_macro2::{Ident, Span, TokenStream};
88
use quote::quote;
99
use std::{error::Error, fmt::Display};

graphql_client_codegen/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
//! Crate for Rust code generation from a GraphQL query, schema, and options.
66
7-
use lazy_static::*;
7+
use lazy_static::lazy_static;
88
use proc_macro2::TokenStream;
9-
use quote::*;
9+
use quote::quote;
1010
use schema::Schema;
1111

1212
mod codegen;

graphql_client_codegen/src/query/fragments.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use super::{Query, ResolvedFragmentId, SelectionId};
22
use crate::schema::TypeId;
3-
use heck::*;
3+
use heck::ToUpperCamelCase;
44

55
#[derive(Debug)]
66
pub(crate) struct ResolvedFragment {

graphql_client_codegen/src/query/operations.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use super::SelectionId;
22
use crate::schema::ObjectId;
3-
use heck::*;
3+
use heck::ToUpperCamelCase;
44

55
#[derive(Debug, Clone)]
66
pub(crate) enum OperationType {

graphql_client_codegen/src/schema/json_conversion.rs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -146,14 +146,7 @@ fn ingest_enum(schema: &mut Schema, enm: &mut FullType) {
146146
.as_mut()
147147
.expect("enm.enum_values.as_mut()")
148148
.iter_mut()
149-
.map(|v| {
150-
std::mem::take(
151-
v.name
152-
.as_mut()
153-
.take()
154-
.expect("variant.name.as_mut().take()"),
155-
)
156-
})
149+
.map(|v| std::mem::take(v.name.as_mut().expect("variant.name.as_mut().take()")))
157150
.collect();
158151

159152
let enm = super::StoredEnum { name, variants };
@@ -321,7 +314,7 @@ fn resolve_input_field_type(
321314
}
322315

323316
fn json_type_qualifiers_depth(typeref: &mut TypeRef) -> usize {
324-
use graphql_introspection_query::introspection_response::*;
317+
use graphql_introspection_query::introspection_response::__TypeKind;
325318

326319
match (typeref.kind.as_mut(), typeref.of_type.as_mut()) {
327320
(Some(__TypeKind::NON_NULL), Some(inner)) => 1 + json_type_qualifiers_depth(inner),
@@ -333,7 +326,7 @@ fn json_type_qualifiers_depth(typeref: &mut TypeRef) -> usize {
333326

334327
fn from_json_type_inner(schema: &mut Schema, inner: &mut TypeRef) -> super::StoredFieldType {
335328
use crate::type_qualifiers::GraphqlTypeQualifier;
336-
use graphql_introspection_query::introspection_response::*;
329+
use graphql_introspection_query::introspection_response::__TypeKind;
337330

338331
let qualifiers_depth = json_type_qualifiers_depth(inner);
339332
let mut qualifiers = Vec::with_capacity(qualifiers_depth);

0 commit comments

Comments
 (0)