chore: enforce `clippy::future_not_send` for `influxdb_iox_client`
parent
6d3432c702
commit
1c5a779b83
|
@ -94,8 +94,8 @@ impl Client {
|
|||
/// [`PerformQuery`] instance that streams Arrow `RecordBatch` results.
|
||||
pub async fn perform_query(
|
||||
&mut self,
|
||||
database_name: impl Into<String>,
|
||||
sql_query: impl Into<String>,
|
||||
database_name: impl Into<String> + Send,
|
||||
sql_query: impl Into<String> + Send,
|
||||
) -> Result<PerformQuery, Error> {
|
||||
PerformQuery::new(self, database_name.into(), sql_query.into()).await
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ impl Client {
|
|||
}
|
||||
|
||||
/// Returns `Ok()` if the corresponding service is serving
|
||||
pub async fn check(&mut self, service: impl Into<String>) -> Result<()> {
|
||||
pub async fn check(&mut self, service: impl Into<String> + Send) -> Result<()> {
|
||||
use health_check_response::ServingStatus;
|
||||
|
||||
let status = self
|
||||
|
|
|
@ -415,7 +415,7 @@ impl Client {
|
|||
/// Get database configuration
|
||||
pub async fn get_database(
|
||||
&mut self,
|
||||
name: impl Into<String>,
|
||||
name: impl Into<String> + Send,
|
||||
) -> Result<DatabaseRules, GetDatabaseError> {
|
||||
let response = self
|
||||
.inner
|
||||
|
@ -438,7 +438,7 @@ impl Client {
|
|||
/// List chunks in a database.
|
||||
pub async fn list_chunks(
|
||||
&mut self,
|
||||
db_name: impl Into<String>,
|
||||
db_name: impl Into<String> + Send,
|
||||
) -> Result<Vec<Chunk>, ListChunksError> {
|
||||
let db_name = db_name.into();
|
||||
|
||||
|
@ -467,7 +467,7 @@ impl Client {
|
|||
pub async fn update_remote(
|
||||
&mut self,
|
||||
id: u32,
|
||||
connection_string: impl Into<String>,
|
||||
connection_string: impl Into<String> + Send,
|
||||
) -> Result<(), UpdateRemoteError> {
|
||||
self.inner
|
||||
.update_remote(UpdateRemoteRequest {
|
||||
|
@ -493,7 +493,7 @@ impl Client {
|
|||
/// List all partitions of the database
|
||||
pub async fn list_partitions(
|
||||
&mut self,
|
||||
db_name: impl Into<String>,
|
||||
db_name: impl Into<String> + Send,
|
||||
) -> Result<Vec<Partition>, ListPartitionsError> {
|
||||
let db_name = db_name.into();
|
||||
let response = self
|
||||
|
@ -514,8 +514,8 @@ impl Client {
|
|||
/// Get details about a specific partition
|
||||
pub async fn get_partition(
|
||||
&mut self,
|
||||
db_name: impl Into<String>,
|
||||
partition_key: impl Into<String>,
|
||||
db_name: impl Into<String> + Send,
|
||||
partition_key: impl Into<String> + Send,
|
||||
) -> Result<Partition, GetPartitionError> {
|
||||
let db_name = db_name.into();
|
||||
let partition_key = partition_key.into();
|
||||
|
@ -541,8 +541,8 @@ impl Client {
|
|||
/// List chunks in a partition
|
||||
pub async fn list_partition_chunks(
|
||||
&mut self,
|
||||
db_name: impl Into<String>,
|
||||
partition_key: impl Into<String>,
|
||||
db_name: impl Into<String> + Send,
|
||||
partition_key: impl Into<String> + Send,
|
||||
) -> Result<Vec<Chunk>, ListPartitionChunksError> {
|
||||
let db_name = db_name.into();
|
||||
let partition_key = partition_key.into();
|
||||
|
@ -564,9 +564,9 @@ impl Client {
|
|||
/// Create a new chunk in a partittion
|
||||
pub async fn new_partition_chunk(
|
||||
&mut self,
|
||||
db_name: impl Into<String>,
|
||||
partition_key: impl Into<String>,
|
||||
table_name: impl Into<String>,
|
||||
db_name: impl Into<String> + Send,
|
||||
partition_key: impl Into<String> + Send,
|
||||
table_name: impl Into<String> + Send,
|
||||
) -> Result<(), NewPartitionChunkError> {
|
||||
let db_name = db_name.into();
|
||||
let partition_key = partition_key.into();
|
||||
|
@ -615,9 +615,9 @@ impl Client {
|
|||
/// Returns the job tracking the data's movement
|
||||
pub async fn close_partition_chunk(
|
||||
&mut self,
|
||||
db_name: impl Into<String>,
|
||||
partition_key: impl Into<String>,
|
||||
table_name: impl Into<String>,
|
||||
db_name: impl Into<String> + Send,
|
||||
partition_key: impl Into<String> + Send,
|
||||
table_name: impl Into<String> + Send,
|
||||
chunk_id: u32,
|
||||
) -> Result<Operation, ClosePartitionChunkError> {
|
||||
let db_name = db_name.into();
|
||||
|
|
|
@ -61,8 +61,8 @@ impl Client {
|
|||
/// [LineProtocol]: https://docs.influxdata.com/influxdb/v2.0/reference/syntax/line-protocol/#data-types-and-format
|
||||
pub async fn write(
|
||||
&mut self,
|
||||
db_name: impl Into<String>,
|
||||
lp_data: impl Into<String>,
|
||||
db_name: impl Into<String> + Send,
|
||||
lp_data: impl Into<String> + Send,
|
||||
) -> Result<usize, WriteError> {
|
||||
let db_name = db_name.into();
|
||||
let lp_data = lp_data.into();
|
||||
|
@ -83,8 +83,8 @@ impl Client {
|
|||
/// [Entry]: https://github.com/influxdata/influxdb_iox/blob/main/entry/src/entry.fbs
|
||||
pub async fn write_entry(
|
||||
&mut self,
|
||||
db_name: impl Into<String>,
|
||||
entry: impl Into<Vec<u8>>,
|
||||
db_name: impl Into<String> + Send,
|
||||
entry: impl Into<Vec<u8>> + Send,
|
||||
) -> Result<(), WriteError> {
|
||||
let db_name = db_name.into();
|
||||
let entry = entry.into();
|
||||
|
|
|
@ -69,7 +69,7 @@ impl Builder {
|
|||
/// Construct the [`Connection`] instance using the specified base URL.
|
||||
pub async fn build<D>(self, dst: D) -> Result<Connection>
|
||||
where
|
||||
D: TryInto<Uri, Error = InvalidUri>,
|
||||
D: TryInto<Uri, Error = InvalidUri> + Send,
|
||||
{
|
||||
let endpoint = Endpoint::from(dst.try_into()?)
|
||||
.user_agent(self.user_agent)?
|
||||
|
|
|
@ -9,7 +9,8 @@
|
|||
missing_docs,
|
||||
clippy::todo,
|
||||
clippy::dbg_macro,
|
||||
clippy::clone_on_ref_ptr
|
||||
clippy::clone_on_ref_ptr,
|
||||
clippy::future_not_send
|
||||
)]
|
||||
#![allow(clippy::missing_docs_in_private_items)]
|
||||
|
||||
|
|
Loading…
Reference in New Issue