Skip to content

Commit 72ba22d

Browse files
committed
fix: replace map_or(false) with == Some() per clippy
1 parent d234490 commit 72ba22d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

chisel-core/src/ops/filesystem.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ mod native {
126126
reason: e.to_string(),
127127
})?;
128128

129-
let existing = if patch.original().map_or(false, |s| s == "/dev/null") {
129+
let existing = if patch.original() == Some("/dev/null") {
130130
String::new()
131131
} else {
132132
dir.read_to_string(&rel).map_err(|e| match e.kind() {
@@ -273,7 +273,7 @@ mod wasm_fallback {
273273
reason: e.to_string(),
274274
})?;
275275

276-
let new_content = if patch.original().map_or(false, |s| s == "/dev/null") {
276+
let new_content = if patch.original() == Some("/dev/null") {
277277
apply("", &patch).map_err(|e| CoreError::PatchFailed {
278278
reason: format!("apply failed: {e:?}"),
279279
})?

0 commit comments

Comments
 (0)