Skip to content

Commit 8e57f80

Browse files
committed
Fix clippy warnings
1 parent 7a8c073 commit 8e57f80

File tree

7 files changed

+14
-4
lines changed

7 files changed

+14
-4
lines changed

api_generator/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,6 @@ void = "1"
3838

3939
[dev-dependencies]
4040
tempfile = "3.12"
41+
42+
[lints.clippy]
43+
uninlined_format_args = "allow" # too pedantic

api_generator/src/generator/code_gen/request/request_builder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ impl<'a> RequestBuilder<'a> {
154154
}
155155
});
156156

157-
let query_ctor = endpoint_params.iter().map(|(param_name, _)| {
157+
let query_ctor = endpoint_params.keys().map(|param_name| {
158158
let field_name = ident(valid_name(param_name).to_lowercase());
159159
quote! {
160160
#field_name: self.#field_name

elasticsearch/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,7 @@ xml-rs = "0.8"
6262

6363
[build-dependencies]
6464
rustc_version = "0.4"
65+
66+
[lints.clippy]
67+
needless_lifetimes = "allow" # generated lifetimes
68+
uninlined_format_args = "allow" # too pedantic

elasticsearch/src/http/transport.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ impl Transport {
485485
/// [Elasticsearch service in Elastic Cloud](https://www.elastic.co/cloud/).
486486
///
487487
/// * `cloud_id`: The Elastic Cloud Id retrieved from the cloud web console, that uniquely
488-
/// identifies the deployment instance.
488+
/// identifies the deployment instance.
489489
/// * `credentials`: A set of credentials the client should use to authenticate to Elasticsearch service.
490490
pub fn cloud(cloud_id: &str, credentials: Credentials) -> Result<Transport, Error> {
491491
let conn_pool = CloudConnectionPool::new(cloud_id)?;

elasticsearch/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
//! - **native-tls** *(enabled by default)*: Enables TLS functionality provided by `native-tls`.
5151
//! - **rustls-tls**: Enables TLS functionality provided by `rustls`.
5252
//! - **beta-apis**: Enables beta APIs. Beta APIs are on track to become stable and permanent features. Use them with
53-
//! caution because it is possible that breaking changes are made to these APIs in a minor version.
53+
//! caution because it is possible that breaking changes are made to these APIs in a minor version.
5454
//! - **experimental-apis**: Enables experimental APIs. Experimental APIs are just that - an experiment. An experimental
5555
//! API might have breaking changes in any future version, or it might even be removed entirely. This feature also
5656
//! enables `beta-apis`.

xtask/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@ chrono = { version = "0.4", features = ["serde"] }
1515
zip = "2"
1616
regex = "1"
1717
xshell = "0.2"
18+
19+
[lints.clippy]
20+
uninlined_format_args = "allow" # too pedantic

yaml_test_runner/src/generator.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ pub fn generate_tests_from_yaml(
425425
error!(
426426
"skipping {}. cannot read as Yaml struct: {}",
427427
relative_path.to_slash_lossy(),
428-
result.err().unwrap().to_string()
428+
result.err().unwrap()
429429
);
430430
continue;
431431
}

0 commit comments

Comments
 (0)