Skip to content

Commit

Permalink
[#48828] Remove redundant casts
Browse files Browse the repository at this point in the history
  • Loading branch information
GPlaczek committed Sep 12, 2023
1 parent cf7c1c0 commit b27f8b8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,13 +192,13 @@ pub fn set_env(key: &str, val: Option<&str>) -> Result<(), ExitCode> {
let c_val = CString::new(v).unwrap();
unsafe {
wasi_ext_lib_generated::wasi_ext_set_env(
c_key.as_ptr() as *const i8,
c_val.as_ptr() as *const i8,
c_key.as_ptr(),
c_val.as_ptr(),
)
}
} else {
unsafe {
wasi_ext_lib_generated::wasi_ext_set_env(c_key.as_ptr() as *const i8, ptr::null::<i8>())
wasi_ext_lib_generated::wasi_ext_set_env(c_key.as_ptr(), ptr::null::<i8>())
}
} {
0 => Ok(()),
Expand Down

0 comments on commit b27f8b8

Please sign in to comment.