Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/rust-fiddle' into rust-fiddle
Browse files Browse the repository at this point in the history
# Conflicts:
#	azure-kusto-data/src/operations/v2.rs
  • Loading branch information
AsafMah committed Jan 31, 2024
2 parents 6b8ed67 + 1e643fe commit 6763c56
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions azure-kusto-data/src/operations/v2.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use crate::error::ParseError;

Check warning on line 1 in azure-kusto-data/src/operations/v2.rs

View workflow job for this annotation

GitHub Actions / clippy

unused import: `crate::error::ParseError`

warning: unused import: `crate::error::ParseError` --> azure-kusto-data/src/operations/v2.rs:1:5 | 1 | use crate::error::ParseError; | ^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default
use crate::error::{Error, Error::JsonError, Partial, partial_from_tuple, PartialExt, Result};
use crate::models::v2;
use crate::models::v2::{DataTable, Frame, QueryCompletionInformation, QueryProperties, TableKind};
Expand All @@ -7,11 +8,10 @@ use futures::{
};
use std::sync::Arc;
use tokio::sync::mpsc::{Receiver, Sender};
use crate::error::ParseError;

pub fn parse_frames_iterative(
reader: impl AsyncBufRead + Unpin,
) -> impl Stream<Item=Result<Frame>> {
) -> impl Stream<Item = Result<Frame>> {
let buf = Vec::with_capacity(4096);
stream::unfold((reader, buf), |(mut reader, mut buf)| async move {
buf.clear();
Expand Down Expand Up @@ -55,7 +55,7 @@ struct StreamingDataset {
}

impl StreamingDataset {
fn new(stream: impl Stream<Item=Result<Frame>> + Send + 'static) -> Self {
fn new(stream: impl Stream<Item = Result<Frame>> + Send + 'static) -> Self {

Check warning on line 58 in azure-kusto-data/src/operations/v2.rs

View workflow job for this annotation

GitHub Actions / clippy

associated function `new` is never used

warning: associated function `new` is never used --> azure-kusto-data/src/operations/v2.rs:58:8 | 57 | impl StreamingDataset { | --------------------- associated function in this implementation 58 | fn new(stream: impl Stream<Item = Result<Frame>> + Send + 'static) -> Self { | ^^^
let (tx, rx) = tokio::sync::mpsc::channel(1);
let res = StreamingDataset {
header: Arc::new(Mutex::new(None)),
Expand Down Expand Up @@ -86,7 +86,7 @@ async fn populate_with_stream(
completion_store: OM<v2::DataSetCompletion>,
query_properties: OM<Vec<QueryProperties>>,
query_completion_information: OM<Vec<QueryCompletionInformation>>,
stream: impl Stream<Item=Result<Frame>>,
stream: impl Stream<Item = Result<Frame>>,
tx: &Sender<Partial<DataTable>>,
) -> Result<()> {
pin_mut!(stream);
Expand Down

0 comments on commit 6763c56

Please sign in to comment.