diff --git a/src/context.rs b/src/context.rs index d513f6d8..c32d407a 100644 --- a/src/context.rs +++ b/src/context.rs @@ -201,7 +201,7 @@ impl<'a> QueryPathNode<'a> { let mut res = Vec::new(); self.for_each(|s| { res.push(match s { - QueryPathSegment::Name(name) => name.to_string(), + QueryPathSegment::Name(name) => (*name).to_string(), QueryPathSegment::Index(idx) => idx.to_string(), }); }); diff --git a/src/http/playground_source.rs b/src/http/playground_source.rs index 5ba9c9d1..099cd853 100644 --- a/src/http/playground_source.rs +++ b/src/http/playground_source.rs @@ -553,7 +553,7 @@ pub fn playground_source(config: GraphQLPlaygroundConfig) -> String { "##.replace("GRAPHQL_PLAYGROUND_CONFIG", &match serde_json::to_string(&config) { Ok(str) => str, - _ => "{}".to_string() + Err(_) => "{}".to_string() }) } diff --git a/src/lib.rs b/src/lib.rs index 4b2787f3..66dde065 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -113,6 +113,40 @@ //! Now a HTML report is available at `benchmark/target/criterion/report`. //! +#![deny(clippy::all)] +// #![deny(clippy::pedantic)] +#![deny(clippy::inefficient_to_string)] +#![deny(clippy::match_wildcard_for_single_variants)] +#![allow(clippy::module_name_repetitions)] +#![allow(clippy::similar_names)] +#![allow(clippy::if_not_else)] +#![allow(clippy::doc_markdown)] +#![allow(clippy::must_use_candidate)] +#![allow(clippy::missing_errors_doc)] +#![allow(clippy::needless_pass_by_value)] +#![allow(clippy::redundant_closure_for_method_calls)] +#![allow(clippy::option_if_let_else)] +#![allow(clippy::match_same_arms)] +#![allow(clippy::filter_map)] +#![allow(clippy::default_trait_access)] +#![allow(clippy::map_flatten)] +#![allow(clippy::map_unwrap_or)] +#![allow(clippy::explicit_iter_loop)] +#![allow(clippy::too_many_lines)] +#![allow(clippy::cast_sign_loss)] +#![allow(clippy::unused_self)] +#![allow(clippy::find_map)] +#![allow(clippy::cast_lossless)] +#![allow(clippy::cast_possible_truncation)] +#![allow(clippy::implicit_hasher)] +// #![deny(clippy::nursery)] +#![allow(clippy::use_self)] +#![allow(clippy::missing_const_for_fn)] +#![allow(clippy::needless_borrow)] +#![allow(clippy::future_not_send)] +#![allow(clippy::redundant_pub_crate)] +#![allow(clippy::cognitive_complexity)] +#![allow(clippy::useless_let_if_seq)] #![warn(missing_docs)] #![allow(clippy::trivially_copy_pass_by_ref)] #![recursion_limit = "256"]