From 45ddeaa25e46f2dc4b8aebab29a5fd70c0308337 Mon Sep 17 00:00:00 2001 From: Dom Dwyer Date: Mon, 22 May 2023 14:10:22 +0200 Subject: [PATCH] refactor(lints): add missing lints to ioxd_querier Adds the standard lints to ioxd_querier and fixes any lint failures. Note this doesn't include the normal "document things" lint, because there's a load of missing docs --- ioxd_querier/src/lib.rs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/ioxd_querier/src/lib.rs b/ioxd_querier/src/lib.rs index 805e901287..cacf426e8a 100644 --- a/ioxd_querier/src/lib.rs +++ b/ioxd_querier/src/lib.rs @@ -1,3 +1,15 @@ +#![deny(rustdoc::broken_intra_doc_links, rust_2018_idioms)] +#![warn( + clippy::clone_on_ref_ptr, + clippy::dbg_macro, + clippy::explicit_iter_loop, + // See https://github.com/influxdata/influxdb_iox/pull/1671 + clippy::future_not_send, + clippy::todo, + clippy::use_self, + missing_debug_implementations, +)] + use async_trait::async_trait; use authz::{Authorizer, IoxAuthorizer}; use clap_blocks::querier::QuerierConfig; @@ -131,7 +143,7 @@ pub enum IoxHttpError { impl IoxHttpError { fn status_code(&self) -> HttpApiErrorCode { match self { - IoxHttpError::NotFound => HttpApiErrorCode::NotFound, + Self::NotFound => HttpApiErrorCode::NotFound, } } }