From 8cde1edb4e880c53e4ee7a02fcbaa2ede9a1879a Mon Sep 17 00:00:00 2001 From: Andrew Lamb Date: Mon, 8 Nov 2021 14:17:09 -0500 Subject: [PATCH] cleanup --- arrow-flight/src/arrow.flight.protocol.rs | 11 +++++++++-- arrow/src/array/array_union.rs | 8 +++----- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/arrow-flight/src/arrow.flight.protocol.rs b/arrow-flight/src/arrow.flight.protocol.rs index 5775c0177590..b1a79ee72031 100644 --- a/arrow-flight/src/arrow.flight.protocol.rs +++ b/arrow-flight/src/arrow.flight.protocol.rs @@ -229,7 +229,7 @@ pub mod flight_service_client { impl FlightServiceClient where T: tonic::client::GrpcService, - T::ResponseBody: Body + Send + 'static, + T::ResponseBody: Body + Send + Sync + 'static, T::Error: Into, ::Error: Into + Send, { @@ -513,6 +513,7 @@ pub mod flight_service_server { #[doc = "Server streaming response type for the Handshake method."] type HandshakeStream: futures_core::Stream> + Send + + Sync + 'static; #[doc = ""] #[doc = " Handshake between client and server. Depending on the server, the"] @@ -526,6 +527,7 @@ pub mod flight_service_server { #[doc = "Server streaming response type for the ListFlights method."] type ListFlightsStream: futures_core::Stream> + Send + + Sync + 'static; #[doc = ""] #[doc = " Get a list of available streams given a particular criteria. Most flight"] @@ -565,6 +567,7 @@ pub mod flight_service_server { #[doc = "Server streaming response type for the DoGet method."] type DoGetStream: futures_core::Stream> + Send + + Sync + 'static; #[doc = ""] #[doc = " Retrieve a single stream associated with a particular descriptor"] @@ -578,6 +581,7 @@ pub mod flight_service_server { #[doc = "Server streaming response type for the DoPut method."] type DoPutStream: futures_core::Stream> + Send + + Sync + 'static; #[doc = ""] #[doc = " Push a stream to the flight service associated with a particular"] @@ -593,6 +597,7 @@ pub mod flight_service_server { #[doc = "Server streaming response type for the DoExchange method."] type DoExchangeStream: futures_core::Stream> + Send + + Sync + 'static; #[doc = ""] #[doc = " Open a bidirectional data channel for a given descriptor. This"] @@ -607,6 +612,7 @@ pub mod flight_service_server { #[doc = "Server streaming response type for the DoAction method."] type DoActionStream: futures_core::Stream> + Send + + Sync + 'static; #[doc = ""] #[doc = " Flight services can support an arbitrary number of simple actions in"] @@ -622,6 +628,7 @@ pub mod flight_service_server { #[doc = "Server streaming response type for the ListActions method."] type ListActionsStream: futures_core::Stream> + Send + + Sync + 'static; #[doc = ""] #[doc = " A flight service exposes all of the available action types that it has"] @@ -667,7 +674,7 @@ pub mod flight_service_server { impl tonic::codegen::Service> for FlightServiceServer where T: FlightService, - B: Body + Send + 'static, + B: Body + Send + Sync + 'static, B::Error: Into + Send + 'static, { type Response = http::Response; diff --git a/arrow/src/array/array_union.rs b/arrow/src/array/array_union.rs index bd2ab8b1786e..d43310eaf9fc 100644 --- a/arrow/src/array/array_union.rs +++ b/arrow/src/array/array_union.rs @@ -88,11 +88,9 @@ impl UnionArray { if let Some(bitmap) = bitmap_data { builder = builder.null_bit_buffer(bitmap) } - let data = { - match value_offsets { - Some(b) => builder.add_buffer(b).build().unwrap(), - None => builder.build().unwrap(), - } + let data = match value_offsets { + Some(b) => builder.add_buffer(b).build_unchecked(), + None => builder.build_unchecked(), }; Self::from(data) }