Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix clippy warnings #1

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix clippy warnings
parmesant committed Sep 8, 2024

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
commit 2f0a9383eefbe718ee13cfa6092b884923948fcb
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions server/Cargo.toml
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@ mime = "0.3.17"
### other dependencies
anyhow = { version = "1.0", features = ["backtrace"] }
argon2 = "0.5.0"
async-trait = "0.1"
async-trait = "0.1.82"
base64 = "0.22.0"
lazy_static = "1.4"
bytes = "1.4"
@@ -71,7 +71,7 @@ prometheus = { version = "0.13", features = ["process"] }
rand = "0.8"
regex = "1.7.3"
relative-path = { version = "1.7", features = ["serde"] }
reqwest = { version = "0.11.27", default_features = false, features = [
reqwest = { version = "0.11.27", default-features = false, features = [
"rustls-tls",
"json",
] } # cannot update cause rustls is not latest `see rustls`
@@ -113,7 +113,7 @@ sha1_smol = { version = "1.0", features = ["std"] }
static-files = "0.2"
ureq = "2.6"
vergen = { version = "8.1", features = ["build", "git", "cargo", "gitcl"] }
zip = { version = "1.1.1", default_features = false, features = ["deflate"] }
zip = { version = "1.1.1", default-features = false, features = ["deflate"] }
url = "2.4.0"
prost-build = "0.12.3"

4 changes: 2 additions & 2 deletions server/src/storage/s3.rs
Original file line number Diff line number Diff line change
@@ -322,7 +322,7 @@ impl S3 {
stream_json_check.push(task);
}

stream_json_check.try_collect().await?;
stream_json_check.try_collect::<()>().await?;

Ok(dirs.into_iter().map(|name| LogStream { name }).collect())
}
@@ -633,7 +633,7 @@ impl ObjectStorage for S3 {
stream_json_check.push(task);
}

stream_json_check.try_collect().await?;
stream_json_check.try_collect::<()>().await?;

Ok(dirs.into_iter().map(|name| LogStream { name }).collect())
}
6 changes: 2 additions & 4 deletions server/src/utils/arrow.rs
Original file line number Diff line number Diff line change
@@ -98,10 +98,8 @@ pub fn record_batches_to_json(records: &[&RecordBatch]) -> Result<Vec<Map<String

let buf = writer.into_inner();

let json_rows: Vec<Map<String, Value>> = match serde_json::from_reader(buf.as_slice()) {
Ok(json) => json,
Err(_) => vec![],
};
let json_rows: Vec<Map<String, Value>> =
serde_json::from_reader(buf.as_slice()).unwrap_or_default();

Ok(json_rows)
}