Skip to content

Commit

Permalink
Apply suggestions
Browse files Browse the repository at this point in the history
Co-Authored-By: Jonas Wanke <contact@wanke.dev>
  • Loading branch information
MarcelGarus and JonasWanke committed Oct 23, 2022
1 parent d57c061 commit f95e722
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
4 changes: 1 addition & 3 deletions compiler/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,7 @@ fn run(options: CandyRunOptions) {
}
stdout.run(&mut vm);
for channel in vm.unreferenced_channels.iter().copied().collect_vec() {
if channel != stdout.channel {
vm.free_channel(channel);
}
vm.free_channel(channel);
}
}
info!("Tree: {:#?}", vm);
Expand Down
1 change: 0 additions & 1 deletion compiler/src/vm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,6 @@ impl Vm {
Some(channel) => channel,
None => {
// The channel was a nursery that died.
// TODO: also panic a nursery performer
if let Performer::Fiber(fiber) = performer {
let tree = self.fibers.get_mut(&fiber).unwrap();
tree.as_single_mut().unwrap().fiber.panic(
Expand Down
1 change: 0 additions & 1 deletion packages/Core/concurrency.candy
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
channel = use "..channel"
function = use "..function"
structGetUnwrap = (use "..struct").getUnwrap

parallel body :=
needs (function.is1 body)
Expand Down

0 comments on commit f95e722

Please sign in to comment.