mirror of
https://github.com/chatmail/core.git
synced 2026-10-02 11:10:25 +03:00
docs: Update STYLE.md: macros should be used only when necessary (#8410)
This commit is contained in:
@@ -181,3 +181,10 @@ Calling `into()`, `try_into()` or `parse()`
|
|||||||
creates an indirection,
|
creates an indirection,
|
||||||
which is hard to follow for people who are not familiar with Rust,
|
which is hard to follow for people who are not familiar with Rust,
|
||||||
or who are not using rust-analyzer.
|
or who are not using rust-analyzer.
|
||||||
|
|
||||||
|
## Use macros only when really needed
|
||||||
|
|
||||||
|
Macros can be hard to read for people unfamiliar with Rust,
|
||||||
|
and can have surprising effects like evaluating arguments multiple times.
|
||||||
|
Therefore, macros should only be used when really needed;
|
||||||
|
using functions is usually better.
|
||||||
|
|||||||
Reference in New Issue
Block a user