Skip to content

Commit b5efb5e

Browse files
committed
changed some wording
1 parent 5d8caa0 commit b5efb5e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

modules/contributor/pages/code-style-guide.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ enum Colors {
199199

200200
=== Formatting of struct fields and enum variants
201201

202-
We add newlines to struct fields and enum variants when they include additional information like documentation comments or attributes, because the variants can become difficult to read.
202+
Add newlines to struct fields and enum variants when they include additional information like documentation comments or attributes, because the variants can become difficult to read.
203203
This is especially the case when fields include doc comments, attributes like `#[snafu()]`, and in case of enum variants, various embedded types.
204204

205205
Enum variants and struct fields don't need to be separated when **no** additional information is attached to any of the variants or fields.
@@ -279,12 +279,12 @@ Comments should only be added if they provide additional information not availab
279279

280280
=== Choice of error crate and usage
281281

282-
We use `snafu` for all error handling in library *and* application code because we want to provide as much context to the user as possible.
282+
Use `snafu` for all error handling in library *and* application code to provide as much context to the user as possible.
283283
Further, `snafu` allows us to use the same source error in multiple error variants.
284-
This feature can be used for cases were we need / require more fine-grained error variants.
284+
This feature can be used for cases where more fine-grained error variants are required.
285285
This behaviour is not possible when using `thiserror`, as it uses the `From` trait to convert the source error into an error variant.
286286

287-
Additionally, we restrict the usage of the `#[snafu(context(false))]` atrribute on error variants.
287+
Additionally, the usage of the `#[snafu(context(false))]` atrribute on error variants is restricted.
288288
This ensures that fallible functions need to call `.context()` to pass the error along.
289289

290290
The usage of `thiserror` is considered invalid.

0 commit comments

Comments
 (0)