Skip to content

Commit d312074

Browse files
committed
add table to migration guide
1 parent e610ea2 commit d312074

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

release-content/migration-guides/combinator_system.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,20 @@ pull_requests: [20671]
44
---
55

66
The `CombinatorSystem`s can be used to combine multiple `SystemCondition`s with logical operators. Previously, the conditions would short circuit if the system failed to run, for example because it's query could not be filled by the world.
7-
Now, if a `SystemCondition` fails, it will be considered to have returned `false` and in combinators that don't short circuit the other condition will now be run.
7+
8+
Now, the `CombinatorSystem`s will work as expected, following the semantics of rust's logical operators.
9+
Namely, if a `SystemCondition` fails, it will be considered to have returned `false` and in combinators that don't short circuit the other condition will now be run.
10+
11+
Specifically, the combinators act as follows:
12+
13+
| Combinator | Rust Equivalent |
14+
|:----------:|:---------------:|
15+
| `and` | `a && b` |
16+
| `or` | `a || b` |
17+
| `xor` | `a ^ b` |
18+
| `nand` | `!(a && b)` |
19+
| `nor` | `!(a || b)` |
20+
| `xnor` | `!(a ^ b)` |
821

922
```rust
1023
fn vacant(_: crate::system::Single<&Vacant>) -> bool {

0 commit comments

Comments
 (0)