diff --git a/service_grpc_influxrpc/src/expr.rs b/service_grpc_influxrpc/src/expr.rs index 915c34310f..e3de7f3dfd 100644 --- a/service_grpc_influxrpc/src/expr.rs +++ b/service_grpc_influxrpc/src/expr.rs @@ -456,6 +456,7 @@ impl InListBuilder { /// Decoded special tag key. /// /// The storage gRPC layer uses magic special bytes to encode measurement name and field name as tag +#[derive(Debug)] pub enum DecodedTagKey { Measurement, Field, diff --git a/service_grpc_influxrpc/src/lib.rs b/service_grpc_influxrpc/src/lib.rs index ae4f3ee879..2869037412 100644 --- a/service_grpc_influxrpc/src/lib.rs +++ b/service_grpc_influxrpc/src/lib.rs @@ -1,4 +1,18 @@ -//! This module contains gRPC service implementation for "InfluxRPC" (aka the storage RPC API used for Flux and InfluxQL) +//! This module contains gRPC service implementation for "InfluxRPC" (aka the +//! storage RPC API used for Flux and InfluxQL) + +#![deny(rustdoc::broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] +#![allow(clippy::clone_on_ref_ptr)] +#![warn( + missing_copy_implementations, + missing_debug_implementations, + clippy::explicit_iter_loop, + // See https://github.com/influxdata/influxdb_iox/pull/1671 + clippy::future_not_send, + clippy::clone_on_ref_ptr, + clippy::todo, + clippy::dbg_macro, +)] /// `[0x00]` is the magic value that that the storage gRPC layer uses to /// encode a tag_key that means "measurement name" diff --git a/service_grpc_influxrpc/src/permit.rs b/service_grpc_influxrpc/src/permit.rs index 3041070d6d..58e5f41e6e 100644 --- a/service_grpc_influxrpc/src/permit.rs +++ b/service_grpc_influxrpc/src/permit.rs @@ -3,6 +3,7 @@ use pin_project::pin_project; use tracker::InstrumentedAsyncOwnedSemaphorePermit; /// Helper to keep a semaphore permit attached to a stream. +#[derive(Debug)] #[pin_project] pub struct StreamWithPermit { #[pin] diff --git a/service_grpc_influxrpc/src/query_completed_token.rs b/service_grpc_influxrpc/src/query_completed_token.rs index 0c27e46a89..097877f978 100644 --- a/service_grpc_influxrpc/src/query_completed_token.rs +++ b/service_grpc_influxrpc/src/query_completed_token.rs @@ -7,9 +7,10 @@ use futures::{ready, Stream, StreamExt}; use iox_query::QueryCompletedToken; /// Wraps an inner query stream, calling the `QueryCompletedToken::set_success` on success +#[derive(Debug)] pub struct QueryCompletedTokenStream where - S: Stream> + Unpin, + S: Stream> + Unpin + Send, { inner: S, token: QueryCompletedToken, @@ -18,7 +19,7 @@ where impl QueryCompletedTokenStream where - S: Stream> + Unpin, + S: Stream> + Unpin + Send, { pub fn new(inner: S, token: QueryCompletedToken) -> Self { Self { @@ -31,7 +32,7 @@ where impl Stream for QueryCompletedTokenStream where - S: Stream> + Unpin, + S: Stream> + Unpin + Send, { type Item = Result; diff --git a/service_grpc_influxrpc/src/service.rs b/service_grpc_influxrpc/src/service.rs index 2308593165..3c5cb15861 100644 --- a/service_grpc_influxrpc/src/service.rs +++ b/service_grpc_influxrpc/src/service.rs @@ -308,7 +308,7 @@ enum InfluxCode { } impl Display for InfluxCode { - fn fmt(&self, f: &mut Formatter) -> FmtResult { + fn fmt(&self, f: &mut Formatter<'_>) -> FmtResult { let str = match self { InfluxCode::EInternal => "internal error", InfluxCode::ENotFound => "not found", @@ -1705,7 +1705,7 @@ pub fn make_response( permit: InstrumentedAsyncOwnedSemaphorePermit, ) -> Result>>, Status> where - S: Stream> + Unpin, + S: Stream> + Unpin + Send, { let mut response = Response::new(StreamWithPermit::new( QueryCompletedTokenStream::new(stream, token),