Skip to content

Commit 3d71647

Browse files
committed
Use cfg unix properly
1 parent 1e0998c commit 3d71647

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tmc-langs-framework/src/command.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ use std::sync::Arc;
1111
use std::thread;
1212
use std::time::{Duration};
1313
use os_pipe::pipe;
14+
#[cfg(unix)]
1415
use shared_child::unix::SharedChildExt;
1516

1617
// todo: collect args?
@@ -145,7 +146,8 @@ impl TmcCommand {
145146
let mut timed_out_handle = timed_out_clone.lock().unwrap();
146147
*timed_out_handle = true;
147148

148-
if cfg!(unix) {
149+
#[cfg(unix)]
150+
{
149151
// Ask process to terminate nicely
150152
let _res2 = child_arc_clone.send_signal(15);
151153
thread::sleep(Duration::from_millis(500));

0 commit comments

Comments
 (0)