mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-08-21 14:02:02 +02:00
[zig/en] Remove incorrect comment in enum section (#5061)
* [zig/en] Remove incorrect comment in enum section Remove a comment in the enum section since it incorrectly says a code snippet won't compile * [zig/en] Add comment to enum section
This commit is contained in:
@@ -588,9 +588,7 @@ const x = switch (direction) {
|
|||||||
.South => true,
|
.South => true,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// This compiles without errors, since it exhaustively lists all possible values
|
||||||
// Switch statements need exhaustiveness.
|
|
||||||
// Won't compile: East and West are missing.
|
|
||||||
const x = switch (direction) {
|
const x = switch (direction) {
|
||||||
.North => true,
|
.North => true,
|
||||||
.South => true,
|
.South => true,
|
||||||
|
Reference in New Issue
Block a user