Skip to content

Commit 7aee080

Browse files
fix(sdk/native): Remove unused io_to_napi and fix clippy warnings
- Remove unused io_to_napi function - Replace 'if let Err(_) =' with '.is_err()' per clippy - Fixes sdks CI build failure
1 parent 76b1199 commit 7aee080

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

  • sdk/native/rust-bindings

‎sdk/native/rust-bindings/lib.rs‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,6 @@ use tempfile::NamedTempFile;
4343
#[cfg(target_os = "linux")]
4444
use std::io::Write;
4545

46-
#[cfg(target_os = "linux")]
47-
fn io_to_napi(err: std::io::Error) -> napi::Error {
48-
napi::Error::from_reason(err.to_string())
49-
}
50-
5146
#[cfg(target_os = "linux")]
5247
fn ensure_embedded_linux_sandbox() -> napi::Result<PathBuf> {
5348
use std::fs;
@@ -58,7 +53,7 @@ fn ensure_embedded_linux_sandbox() -> napi::Result<PathBuf> {
5853
// Use get_or_init with a closure that handles errors manually
5954
SANDBOX_PATH.get_or_init(|| {
6055
let root = std::env::temp_dir().join("codex-native");
61-
if let Err(_) = fs::create_dir_all(&root) {
56+
if fs::create_dir_all(&root).is_err() {
6257
return PathBuf::new();
6358
}
6459
let target_path = root.join("codex-linux-sandbox");

0 commit comments

Comments
 (0)