Skip to content

Commit

Permalink
chore(build): Make clippy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
lquerel committed Aug 10, 2024
1 parent a779dbe commit 3b4be7d
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 20 deletions.
20 changes: 10 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "gcp-bigquery-client"
version = "0.22.0"
version = "0.23.0"
authors = ["Laurent Querel <laurent.querel@gmail.com>"]
edition = "2021"
license = "MIT OR Apache-2.0"
Expand Down Expand Up @@ -33,11 +33,11 @@ optional = true
[dependencies]
yup-oauth2 = { version = "11", default-features = false, features = ["hyper-rustls", "service-account"] }
hyper = { version = "1.4.1", features = ["http1"] }
hyper-util = { version = "0.1.6", default-features = false, features = [
hyper-util = { version = "0.1.7", default-features = false, features = [
"client-legacy",
] }
thiserror = "1.0.62"
tokio = { version = "1.38.0", default-features = false, features = [
thiserror = "1.0.63"
tokio = { version = "1.39.2", default-features = false, features = [
"rt-multi-thread",
"net",
"sync",
Expand All @@ -47,8 +47,8 @@ tokio-stream = "0.1.15"
async-stream = "0.3.5"
reqwest = { version = "0.12.5", default-features = false, features = ["json"] }
url = "2.5.2"
serde = "1.0.204"
serde_json = "1.0.120"
serde = "1.0.205"
serde_json = "1.0.122"
log = "0.4.22"
time = { version = "0.3.36", features = [
"local-offset",
Expand All @@ -62,14 +62,14 @@ async-trait = "0.1.81"
dyn-clone = "1.0.17"
prost = "0.13.1"
prost-types = "0.13.1"
tonic = { version = "0.12", features = ["transport", "tls", "tls-roots"] }
tonic = { version = "0.12.1", features = ["transport", "tls", "tls-roots"] }

[dev-dependencies]
tokio-test = "0.4.4"
rand = "0.8.5"
wiremock = "0.6.0"
tempfile = "3.10.1"
wiremock = "0.6.1"
tempfile = "3.12.0"
fake = "2.9.2"

[build-dependencies]
tonic-build = { version = "0.12", features = ["cleanup-markdown"] }
tonic-build = { version = "0.12.1", features = ["cleanup-markdown"] }
10 changes: 5 additions & 5 deletions src/job.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ impl JobApi {
/// * `project_id`- Project ID of the query request.
/// * `query` - The initial query configuration that is submitted when the job is inserted.
/// * `page_size` - The size of each page fetched. By default, this is set to `None`, and the limit is 10 MB of
/// rows instead.
/// rows instead.
pub fn query_all<'a>(
&'a self,
project_id: &'a str,
Expand Down Expand Up @@ -135,7 +135,7 @@ impl JobApi {
/// * `location` - Geographic location of the job.
/// * `query` - The initial query configuration that is submitted when the job is inserted.
/// * `page_size` - The size of each page fetched. By default, this is set to `None`, and the limit is 10 MB of
/// rows instead.
/// rows instead.
pub fn query_all_with_location<'a>(
&'a self,
project_id: &'a str,
Expand Down Expand Up @@ -204,7 +204,7 @@ impl JobApi {
/// * `job_reference` - The initital job reference configuration that is submitted when the job is inserted
/// * `query` - The initial query configuration that is submitted when the job is inserted.
/// * `page_size` - The size of each page fetched. By default, this is set to `None`, and the limit is 10 MB of
/// rows instead.
/// rows instead.
pub fn query_all_with_job_reference<'a>(
&'a self,
project_id: &'a str,
Expand Down Expand Up @@ -388,7 +388,7 @@ impl JobApi {
/// * `project_id` - Project ID of the requested job.
/// * `job_id` - Job ID of the requested job.
/// * `location` - The geographic location of the job. Required except for US and EU. See
/// details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location.
/// details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location.
pub async fn get_job(&self, project_id: &str, job_id: &str, location: Option<&str>) -> Result<Job, BQError> {
let req_url = format!(
"{base_url}/projects/{project_id}/jobs/{job_id}",
Expand Down Expand Up @@ -418,7 +418,7 @@ impl JobApi {
/// * `project_id` - Project ID of the job to cancel.
/// * `job_id` - Job ID of the job to cancel.
/// * `location` - The geographic location of the job. Required except for US and EU. See
/// details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location.
/// details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location.
pub async fn cancel_job(
&self,
project_id: &str,
Expand Down
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ pub fn env_vars() -> (String, String, String, String) {
}

pub mod google {
#![allow(clippy::all)]
#[path = "google.api.rs"]
pub mod api;

Expand All @@ -238,6 +239,7 @@ pub mod google {
pub mod bigquery {
#[path = ""]
pub mod storage {
#![allow(clippy::all)]
#[path = "google.cloud.bigquery.storage.v1.rs"]
pub mod v1;
}
Expand Down
3 changes: 3 additions & 0 deletions src/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ impl StorageApi {
}

pub(crate) async fn new_write_client() -> Result<BigQueryWriteClient<Channel>, BQError> {
// Since Tonic 0.12.0, TLS root certificates are no longer implicit.
// We need to specify them explicitly.
// See: https://github.com/hyperium/tonic/pull/1731
let tls_config = ClientTlsConfig::new()
.domain_name(BIGQUERY_STORAGE_API_DOMAIN)
.with_native_roots();
Expand Down
10 changes: 5 additions & 5 deletions src/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ impl TableApi {
/// * dataset_id - Dataset ID of the table to delete
/// * table_id - Table ID of the table to delete
/// * selected_fields - tabledata.list of table schema fields to return (comma-separated). If unspecified, all
/// fields are returned. A fieldMask cannot be used here because the fields will automatically be converted from
/// camelCase to snake_case and the conversion will fail if there are underscores. Since these are fields in
/// BigQuery table schemas, underscores are allowed.
/// fields are returned. A fieldMask cannot be used here because the fields will automatically be converted from
/// camelCase to snake_case and the conversion will fail if there are underscores. Since these are fields in
/// BigQuery table schemas, underscores are allowed.
pub async fn get(
&self,
project_id: &str,
Expand Down Expand Up @@ -253,7 +253,7 @@ impl TableApi {
/// a policy set.
/// # Argument
/// * `resource` - The resource for which the policy is being requested. See the operation documentation for the
/// appropriate value for this field.
/// appropriate value for this field.
pub async fn get_iam_policy(
&self,
resource: &str,
Expand Down Expand Up @@ -314,7 +314,7 @@ impl TableApi {
/// \"fail open\" without warning.
/// # Argument
/// * `resource` - The resource for which the policy detail is being requested. See the operation documentation for
/// the appropriate value for this field.
/// the appropriate value for this field.
pub async fn test_iam_permissions(
&self,
resource: &str,
Expand Down

0 comments on commit 3b4be7d

Please sign in to comment.