File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -188,12 +188,16 @@ impl Sys for RealSys {
188188 static PATH_EXTENSIONS : OnceLock < Vec < String > > = OnceLock :: new ( ) ;
189189 let path_extensions = PATH_EXTENSIONS . get_or_init ( || {
190190 self . env_path_ext ( )
191- . and_then ( |pathext| match pathext. into_string ( ) {
192- Ok ( pathext) => Some ( pathext) ,
193- Err ( _) => {
194- #[ cfg( feature = "tracing" ) ]
195- tracing:: error!( "pathext is not valid unicode" ) ;
196- None
191+ . and_then ( |pathext| {
192+ // If tracing feature enabled then this lint is incorrect, so disable it.
193+ #[ allow( clippy:: manual_ok_err) ]
194+ match pathext. into_string ( ) {
195+ Ok ( pathext) => Some ( pathext) ,
196+ Err ( _) => {
197+ #[ cfg( feature = "tracing" ) ]
198+ tracing:: error!( "pathext is not valid unicode" ) ;
199+ None
200+ }
197201 }
198202 } )
199203 . map ( |s| parse_path_ext ( & s) )
You can’t perform that action at this time.
0 commit comments