Skip to content

Commit 6fbd4b1

Browse files
committed
Bump Rust version to 1.85 for edition2024 support
1 parent c585597 commit 6fbd4b1

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "usls"
33
edition = "2021"
44
version = "0.1.0-rc.1"
5-
rust-version = "1.82"
5+
rust-version = "1.85"
66
description = "A Rust library integrated with ONNXRuntime, providing a collection of ML models."
77
repository = "https://github.com/jamjamjon/usls"
88
authors = ["Jamjamjon <xxyydzml@outlook.com>"]

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[toolchain]
2-
channel = "1.82"
2+
channel = "1.85"
33
components = ["rustfmt", "clippy"]

src/viz/drawable/keypoint.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ impl Drawable for Keypoint {
2323
canvas: &mut RgbaImage,
2424
style: &Style,
2525
) -> Result<()> {
26-
if self.confidence().map_or(true, |conf| conf == 0.0) {
26+
if self.confidence().is_none_or(|conf| conf == 0.0) {
2727
return Ok(());
2828
}
2929

@@ -68,7 +68,7 @@ impl Drawable for Keypoint {
6868
canvas: &mut RgbaImage,
6969
style: &Style,
7070
) -> Result<()> {
71-
if self.confidence().map_or(true, |conf| conf == 0.0) {
71+
if self.confidence().is_none_or(|conf| conf == 0.0) {
7272
return Ok(());
7373
}
7474

@@ -129,8 +129,8 @@ impl Drawable for [Keypoint] {
129129
let kpt1: &_ = &self[i];
130130
let kpt2: &_ = &self[ii];
131131

132-
if kpt1.confidence().map_or(true, |conf| conf == 0.0)
133-
|| kpt2.confidence().map_or(true, |conf| conf == 0.0)
132+
if kpt1.confidence().is_none_or(|conf| conf == 0.0)
133+
|| kpt2.confidence().is_none_or(|conf| conf == 0.0)
134134
{
135135
continue;
136136
}

0 commit comments

Comments
 (0)