Skip to content

Commit 863a0d9

Browse files
committed
disable incorrect lint
1 parent 5c07d72 commit 863a0d9

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/sys.rs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff 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))

0 commit comments

Comments
 (0)