Skip to content

Commit d6ff3f2

Browse files
committed
lints
1 parent 9558b54 commit d6ff3f2

File tree

5 files changed

+9
-15
lines changed

5 files changed

+9
-15
lines changed

Cargo.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# -*- eval: (cargo-minor-mode 1) -*-
2-
31
[workspace]
42
members = ["influxdb", "influxdb_derive", "benches"]
53
resolver = "2"
@@ -13,12 +11,13 @@ repository = "https://github.com/influxdb-rs/influxdb-rust"
1311

1412
[workspace.lints.rust]
1513
bare_trait_objects = "forbid"
14+
elided_lifetimes_in_paths = "forbid"
1615
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(tarpaulin)', 'cfg(tarpaulin_include)'] }
16+
unsafe_code = "forbid"
1717

1818
[workspace.lints.clippy]
1919
multiple_bound_locations = "allow" # clippy has wrong opinions
2020
needless_doctest_main = "allow"
21-
needless_lifetimes = "allow" # False positive in client/mod.rs query fn
2221

2322
[patch.crates-io]
2423
influxdb = { path = "./influxdb" }

influxdb/Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# -*- eval: (cargo-minor-mode 1) -*-
2-
31
[package]
42
name = "influxdb"
53
version = "0.7.2"
@@ -31,7 +29,6 @@ reqwest = { version = "0.12.23", default-features = false }
3129
serde = { version = "1.0.186", optional = true }
3230
serde_derive = { version = "1.0.186", optional = true }
3331
serde_json = { version = "1.0.48", optional = true }
34-
surf = { version = "2.2.0", default-features = false, optional = true }
3532
thiserror = "2.0.16"
3633
time = { version = "0.3.39", optional = true }
3734

influxdb/src/integrations/serde_integration/de.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ where
3535
{
3636
type Value = Series<T>;
3737

38-
fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
38+
fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
3939
formatter.write_str("struct Series")
4040
}
4141

@@ -130,7 +130,7 @@ where
130130
{
131131
type Value = TaggedSeries<TAG, T>;
132132

133-
fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
133+
fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
134134
formatter.write_str("struct TaggedSeries")
135135
}
136136

@@ -230,7 +230,7 @@ where
230230
{
231231
type Value = Vec<T>;
232232

233-
fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
233+
fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
234234
write!(formatter, "an array of arrays")
235235
}
236236

@@ -287,7 +287,7 @@ where
287287
{
288288
type Value = T;
289289

290-
fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
290+
fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
291291
formatter.write_str("array")
292292
}
293293

@@ -391,7 +391,7 @@ mod tests {
391391
fn test_deserialize_cow() {
392392
// Unfortunately, Cow is not automatically borrowed,
393393
// so this is basically equivalent to String, String
394-
let result = serde_json::from_str::<Series<HashMap<Cow<str>, Cow<str>>>>(TEST_DATA);
394+
let result = serde_json::from_str::<Series<HashMap<Cow<'_, str>, Cow<'_, str>>>>(TEST_DATA);
395395
assert!(result.is_ok());
396396
assert_eq!(
397397
EqSeries::from(result.unwrap()),
@@ -429,7 +429,7 @@ mod tests {
429429
bar: &'a str,
430430
}
431431

432-
let result = serde_json::from_str::<Series<BorrowingStruct>>(TEST_DATA);
432+
let result = serde_json::from_str::<Series<BorrowingStruct<'_>>>(TEST_DATA);
433433
assert!(result.is_ok(), "{}", result.unwrap_err());
434434
assert_eq!(
435435
EqSeries::from(result.unwrap()),

influxdb/src/query/write_query.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ pub enum Type {
121121
}
122122

123123
impl Display for Type {
124-
fn fmt(&self, f: &mut Formatter) -> std::fmt::Result {
124+
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
125125
use Type::*;
126126

127127
match self {

influxdb_derive/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# -*- eval: (cargo-minor-mode 1) -*-
2-
31
[package]
42
name = "influxdb_derive"
53
version = "0.5.1"

0 commit comments

Comments
 (0)