Skip to content

Commit

Permalink
Bump MSRV to 1.65 and fix warnings (#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
msrd0 committed Feb 14, 2024
1 parent 4a93896 commit 2bc0934
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
matrix:
rust:
- name: MSRV
toolchain: "1.63"
toolchain: "1.65"
nightly: false
- name: Stable
toolchain: stable
Expand Down
4 changes: 2 additions & 2 deletions README.j2
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
<a href="https://www.rust-lang.org/en-US/">
<img src="https://img.shields.io/badge/Made%20with-Rust-orange.svg" alt='Build with Rust' />
</a>
<a href="https://blog.rust-lang.org/2022/08/11/Rust-1.63.0.html">
<img src="https://img.shields.io/badge/rustc-1.63+-yellow.svg" alt='Minimum Rust Version: 1.63' />
<a href="https://blog.rust-lang.org/2022/11/03/Rust-1.65.0.html">
<img src="https://img.shields.io/badge/rustc-1.65+-yellow.svg" alt='Minimum Rust Version: 1.65' />
</a>
</p>

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
<a href="https://www.rust-lang.org/en-US/">
<img src="https://img.shields.io/badge/Made%20with-Rust-orange.svg" alt='Build with Rust' />
</a>
<a href="https://blog.rust-lang.org/2022/08/11/Rust-1.63.0.html">
<img src="https://img.shields.io/badge/rustc-1.63+-yellow.svg" alt='Minimum Rust Version: 1.63' />
<a href="https://blog.rust-lang.org/2022/11/03/Rust-1.65.0.html">
<img src="https://img.shields.io/badge/rustc-1.65+-yellow.svg" alt='Minimum Rust Version: 1.65' />
</a>
</p>

Expand Down Expand Up @@ -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/
Expand Down
2 changes: 1 addition & 1 deletion influxdb/src/query/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ where
T: TimeZone,
{
fn from(date_time: DateTime<T>) -> Self {
Timestamp::Nanoseconds(date_time.timestamp_nanos() as u128)
Timestamp::Nanoseconds(date_time.timestamp_nanos_opt().unwrap() as u128)
}
}

Expand Down
2 changes: 1 addition & 1 deletion influxdb/src/query/write_query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ impl Query for Vec<WriteQuery> {

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()),
Expand Down

0 comments on commit 2bc0934

Please sign in to comment.