From 998ceec581e9b5fbcbfb15620ac1230b4999a985 Mon Sep 17 00:00:00 2001
From: Dominic
Date: Wed, 14 Feb 2024 10:59:23 +0100
Subject: [PATCH] Bump MSRV to 1.65 and fix warnings
---
.github/workflows/rust.yml | 4 ++--
README.j2 | 4 ++--
README.md | 6 +++---
influxdb/src/query/mod.rs | 2 +-
influxdb/src/query/write_query.rs | 2 +-
5 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index b56b977..8658eca 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -24,7 +24,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- - uses: dtolnay/rust-toolchain@1.72.0
+ - uses: dtolnay/rust-toolchain@1.75.0
with:
components: clippy
- name: Check Clippy lints (reqwest)
@@ -54,7 +54,7 @@ jobs:
matrix:
rust:
- name: MSRV
- toolchain: "1.63"
+ toolchain: "1.65"
nightly: false
- name: Stable
toolchain: stable
diff --git a/README.j2 b/README.j2
index 7e66167..489ca0c 100644
--- a/README.j2
+++ b/README.j2
@@ -25,8 +25,8 @@
-
-
+
+
diff --git a/README.md b/README.md
index c05a00a..695fe15 100644
--- a/README.md
+++ b/README.md
@@ -25,8 +25,8 @@
-
-
+
+
@@ -166,7 +166,7 @@ To communicate with InfluxDB, you can choose the HTTP backend to be used configu
@ 2020 Gero Gerke and [contributors].
[contributors]: https://github.com/influxdb-rs/influxdb-rust/graphs/contributors
- [__cargo_doc2readme_dependencies_info]: ggGkYW0BYXSEG64av5CnNoNoGw8lPMr2b0MoG44uU0T70vGSG7osgcbjN7SoYXKEGzTIyZ81-O7yGzBPOAorSf5GGwJWIVB6K85jG41Hl-f5lXJVYWSBgmhpbmZsdXhkYmUwLjcuMQ
+ [__cargo_doc2readme_dependencies_info]: ggGkYW0BYXSEG_Yk-0hvrVPoG-pGw0Sym8kbG2s5Ga25QGRAG6zgaYax6AfsYXKEGzTIyZ81-O7yGzBPOAorSf5GGwJWIVB6K85jG41Hl-f5lXJVYWSBgmhpbmZsdXhkYmUwLjcuMQ
[__link0]: https://github.com/influxdb-rs/influxdb-rust/blob/main/CONTRIBUTING.md
[__link1]: https://github.com/influxdb-rs/influxdb-rust/blob/main/CODE_OF_CONDUCT.md
[__link10]: https://curl.se/libcurl/
diff --git a/influxdb/src/query/mod.rs b/influxdb/src/query/mod.rs
index ccb3513..02163c7 100644
--- a/influxdb/src/query/mod.rs
+++ b/influxdb/src/query/mod.rs
@@ -91,7 +91,7 @@ where
T: TimeZone,
{
fn from(date_time: DateTime) -> Self {
- Timestamp::Nanoseconds(date_time.timestamp_nanos() as u128)
+ Timestamp::Nanoseconds(date_time.timestamp_nanos_opt().unwrap() as u128)
}
}
diff --git a/influxdb/src/query/write_query.rs b/influxdb/src/query/write_query.rs
index 7014731..75d8b02 100644
--- a/influxdb/src/query/write_query.rs
+++ b/influxdb/src/query/write_query.rs
@@ -267,7 +267,7 @@ impl Query for Vec {
fn get_type(&self) -> QueryType {
QueryType::WriteQuery(
- self.get(0)
+ self.first()
.map(|q| q.get_precision())
// use "ms" as placeholder if query is empty
.unwrap_or_else(|| "ms".to_owned()),