Skip to content

Commit 241e4bf

Browse files
committed
fix formatting
1 parent d77e97b commit 241e4bf

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

snowflake-api/src/lib.rs

+6-7
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,9 @@ impl RawQueryResult {
179179
.collect::<Vec<Result<RecordBatch, ArrowError>>>()
180180
.await;
181181

182-
return Ok(QueryResult::Arrow(
182+
Ok(QueryResult::Arrow(
183183
arrow_records.into_iter().map(Result::unwrap).collect(),
184-
));
184+
))
185185
}
186186
RawQueryResult::Json(j) => Ok(QueryResult::Json(j)),
187187
RawQueryResult::Empty => Ok(QueryResult::Empty),
@@ -201,12 +201,11 @@ impl RawQueryResult {
201201
let batch_stream = bytes_stream.flat_map(|bytes_result| match bytes_result {
202202
Ok(bytes) => match Self::bytes_to_batches(bytes) {
203203
Ok(batches) => futures::stream::iter(batches.into_iter().map(Ok)).boxed(),
204-
Err(e) => futures::stream::once(async move { Err(ArrowError::from(e)) }).boxed(),
204+
Err(e) => futures::stream::once(async move { Err(e) }).boxed(),
205205
},
206206
Err(e) => futures::stream::once(async move {
207207
Err(ArrowError::ParseError(format!(
208-
"Unable to parse RecordBatch due to error in bytes stream: {}",
209-
e.to_string()
208+
"Unable to parse RecordBatch due to error in bytes stream: {e}"
210209
)))
211210
})
212211
.boxed(),
@@ -486,7 +485,7 @@ impl SnowflakeApi {
486485
sql: &str,
487486
enable_streaming: bool,
488487
) -> Result<RawQueryResult, SnowflakeApiError> {
489-
let mut resp = self
488+
let resp = self
490489
.run_sql::<ExecResponse>(sql, QueryType::ArrowQuery)
491490
.await?;
492491
log::debug!("Got query response: {:?}", resp);
@@ -571,7 +570,7 @@ impl SnowflakeApi {
571570

572571
Ok(resp)
573572
}
574-
573+
575574
fn chunks_to_bytes_stream(&self, data: &QueryExecResponseData) -> RawQueryResult {
576575
let chunk_urls = data
577576
.chunks

0 commit comments

Comments
 (0)