File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22name = " usls"
33edition = " 2021"
44version = " 0.1.0-rc.1"
5- rust-version = " 1.82 "
5+ rust-version = " 1.85 "
66description = " A Rust library integrated with ONNXRuntime, providing a collection of ML models."
77repository = " https://github.com/jamjamjon/usls"
88authors = [" Jamjamjon <xxyydzml@outlook.com>" ]
Original file line number Diff line number Diff line change 11[toolchain ]
2- channel = " 1.82 "
2+ channel = " 1.85 "
33components = [" rustfmt" , " clippy" ]
Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments