Skip to content

Commit b0938ff

Browse files
committed
Fix cargo clippy warnings
1 parent 530ef5d commit b0938ff

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/context.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,9 @@ impl Context {
563563
let tx_json = serde_json::to_string(&dump_tx).expect("dump tx to string");
564564
std::fs::write(&tx_file, tx_json).expect("write setup");
565565

566-
std::env::set_var("CKB_TX_FILE", tx_file.to_str().unwrap());
566+
unsafe {
567+
std::env::set_var("CKB_TX_FILE", tx_file.to_str().unwrap());
568+
}
567569
Some(tmp_dir)
568570
} else {
569571
None
@@ -604,7 +606,9 @@ impl Context {
604606
native_binaries
605607
);
606608
std::fs::write(&running_setup, setup).expect("write setup");
607-
std::env::set_var("CKB_RUNNING_SETUP", running_setup.to_str().unwrap());
609+
unsafe {
610+
std::env::set_var("CKB_RUNNING_SETUP", running_setup.to_str().unwrap());
611+
}
608612

609613
type CkbMainFunc<'a> =
610614
libloading::Symbol<'a, unsafe extern "C" fn(argc: i32, argv: *const *const i8) -> i8>;

0 commit comments

Comments
 (0)