Skip to content

Commit 5c2fa7c

Browse files
committed
Fix clippy lints
1 parent 5aa7273 commit 5c2fa7c

2 files changed

Lines changed: 8 additions & 9 deletions

File tree

lib/wasix/src/syscalls/wasix/proc_exec3.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ pub fn proc_exec3<M: MemorySize>(
207207
ctx.data_mut().swap_inner(&mut vfork.env);
208208
std::mem::swap(ctx.data_mut(), &mut vfork.env);
209209

210-
assert!(!vfork.env.context_switching_environment.is_some());
210+
assert!(vfork.env.context_switching_environment.is_none());
211211
assert!(ctx.data().context_switching_environment.is_some());
212212
// Jump back to the vfork point and current on execution
213213
// note: fork does not return any values hence passing `()`

lib/wasix/src/syscalls/wasix/proc_fork.rs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,14 @@ pub fn proc_fork<M: MemorySize>(
3232
Errno::Notsup
3333
}));
3434

35-
if let Some(context_switching_environment) = ctx.data().context_switching_environment.as_ref() {
36-
if context_switching_environment.active_context_id()
35+
if let Some(context_switching_environment) = ctx.data().context_switching_environment.as_ref()
36+
&& context_switching_environment.active_context_id()
3737
!= context_switching_environment.main_context_id()
38-
{
39-
warn!(
40-
"process forking is only supported from the main context when using WASIX context-switching features"
41-
);
42-
return Ok(Errno::Notsup);
43-
}
38+
{
39+
warn!(
40+
"process forking is only supported from the main context when using WASIX context-switching features"
41+
);
42+
return Ok(Errno::Notsup);
4443
}
4544

4645
// If we were just restored then we need to return the value instead

0 commit comments

Comments
 (0)