Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/uucore/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,9 +350,7 @@ fn embed_locale_file(
/// Check if we are cross-compiling for WASI (build.rs runs on the host,
/// so `#[cfg(target_os = "wasi")]` does not work here).
fn is_wasi_target() -> bool {
env::var("CARGO_CFG_TARGET_OS")
.map(|os| os == "wasi")
.unwrap_or(false)
env::var("CARGO_CFG_TARGET_OS").is_ok_and(|os| os == "wasi")
}

/// For WASI/WASM builds, embed ALL available .ftl files in a locale
Expand Down
11 changes: 5 additions & 6 deletions src/uucore/src/lib/features/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -435,12 +435,11 @@ pub fn canonicalize<P: AsRef<Path>>(
}
result.pop();
}
Err(e) => {
if miss_mode == MissingHandling::Existing
|| (miss_mode == MissingHandling::Normal && !parts.is_empty())
{
return Err(e);
}
Err(e)
if (miss_mode == MissingHandling::Existing
|| (miss_mode == MissingHandling::Normal && !parts.is_empty())) =>
{
return Err(e);
}
_ => {}
}
Expand Down
Loading