Update `STYLE`

6138d0b76a756cfd4f63f9a06f6856ddcad9257cbc50ea588933c8c82f72489f
Alexis Sellier committed ago 1 parent 8c7552bb
STYLE +8 -1
59 59
* Panic strings should be prefixed by the enclosing function name, and ":".
60 60
* Use `assert` instead of `panic` when it's clearer/simpler.
61 61
62 62
MODULES
63 63
64 -
* For large modules, group related declarations with simple ASCII section banners such as `// Constants //` or `// Error Handling //`.
65 64
* Keep imports and sub-modules at the top, then constants, then types, then functions.
66 65
67 66
TESTS
68 67
69 68
* In tests, use `assert` for expected behavior and keep distinct scenarios in small helper functions when covering multiple cases.
69 +
70 +
FORMATTING
71 +
72 +
* Don't add blank lines after closing braces (`}`).
73 +
* Group `let`/`let mut` statements together when possible.
74 +
* Wrap lines at 80 columns.
75 +
* Avoid inline blocks, eg. DO NOT do `if n { return true; }`.
76 +
* Always follow semicolons (`;`) with a new line.