Clippy clean

This commit is contained in:
Sunli 2022-04-28 12:14:23 +08:00
parent f2e25c9f4a
commit 7707a45eaa
7 changed files with 2265 additions and 2078 deletions

View File

@ -1,12 +1,12 @@
edition = "2021"
newline_style = "unix"
newline_style = "Unix"
# comments
normalize_comments=true
wrap_comments=true
format_code_in_doc_comments=true
normalize_comments = true
wrap_comments = true
format_code_in_doc_comments = true
# imports
imports_granularity="Crate"
group_imports="StdExternalCrate"
imports_granularity = "Crate"
group_imports = "StdExternalCrate"
# report
#report_fixme="Unnumbered"
#report_todo="Unnumbered"

View File

@ -12,6 +12,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add `bson-uuid` feature to implement `ScalarType` for `bson::Uuid`. [#875](https://github.com/async-graphql/async-graphql/pull/875)
- Bump `regex` crate from `1.4.5` to `1.5.5`. [#862](https://github.com/async-graphql/async-graphql/pull/862)
- Bump `chrono-tz` crate from `0.5.3` to `0.6.1`. [#831](https://github.com/async-graphql/async-graphql/pull/831)
- Move the pest parser code generation step into a test. [#901](https://github.com/async-graphql/async-graphql/pull/901)
- Update `log` to version `0.4.16`. [#903](https://github.com/async-graphql/async-graphql/pull/903)
- Added impl of `CursorType` for floats [#897](https://github.com/async-graphql/async-graphql/pull/897)
# [3.0.38] 2022-4-8

File diff suppressed because it is too large Load Diff

View File

@ -2,11 +2,12 @@
//!
//! This module's structure mirrors `types`.
use std::collections::{hash_map, HashMap};
use pest::{
iterators::{Pair, Pairs},
Parser,
};
use pest_derive::Parser;
use utils::*;
use crate::{
@ -16,6 +17,7 @@ use crate::{
};
mod executable;
#[allow(clippy::redundant_static_lifetimes)]
mod generated;
mod service;
mod utils;

View File

@ -18,13 +18,11 @@ use super::GraphQLParser;
#[test]
fn generated_code_is_fresh() {
let input = format!(
r###"
let input = r###"
#[derive(Parser)]
#[grammar = r#"graphql.pest"#]
struct GraphQLParser;
"###,
)
"###
.parse::<proc_macro2::TokenStream>()
.unwrap();

View File

@ -1,6 +1,8 @@
use std::convert::Infallible;
use std::fmt::Display;
use std::num::{ParseFloatError, ParseIntError};
use std::{
convert::Infallible,
fmt::Display,
num::{ParseFloatError, ParseIntError},
};
use crate::ID;

View File

@ -222,7 +222,7 @@ where
/// # Examples
///
/// ```rust
///
///
/// use async_graphql::*;
/// use async_graphql::types::connection::*;
///