Skip to content

Commit

Permalink
Fix typos (#778)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasbb committed Sep 12, 2024
2 parents c3e489f + 378fa24 commit 2a28e46
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 11 deletions.
2 changes: 2 additions & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[default.extend-words]
Algorythm = "Algorythm"
2 changes: 1 addition & 1 deletion serde_with/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ It only affects custom character sets used for base64 of which there are no inst
}
```

The `apply` attribute will expand into this, applying the attributs to the matching fields:
The `apply` attribute will expand into this, applying the attributes to the matching fields:

```rust
#[derive(serde::Serialize)]
Expand Down
2 changes: 1 addition & 1 deletion serde_with/src/guide/serde_as.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ For more information, you can inspect the documentation of the `serde_as` macro.
#[derive(Serialize, Deserialize)]
struct A {
#[serde_as(as = "Option<DisplayFromStr>")]
// In this situation boths `Option`s will be correctly identified and
// In this situation both `Option`s will be correctly identified and
// `#[serde(default)]` will be applied on this field.
val: Option<u32>,
}
Expand Down
4 changes: 2 additions & 2 deletions serde_with_macros/tests/compile-fail/serde_as.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ struct ConflictingAsAnnotations {
normal_field: u32,
#[serde_as(does_not_exist = "123")]
unknown: u32,
#[serde_as(unknwn1 = "Hello", unknw2 = "World")]
two_unkowns: u32,
#[serde_as(unknown1 = "Hello", unknown2 = "World")]
two_unknowns: u32,
}

/// Test error message for malformed attributes
Expand Down
14 changes: 7 additions & 7 deletions serde_with_macros/tests/compile-fail/serde_as.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,17 @@ error: Unknown field: `does_not_exist`
57 | #[serde_as(does_not_exist = "123")]
| ^^^^^^^^^^^^^^

error: Unknown field: `unknwn1`
error: Unknown field: `unknown1`
--> tests/compile-fail/serde_as.rs:59:16
|
59 | #[serde_as(unknwn1 = "Hello", unknw2 = "World")]
| ^^^^^^^
59 | #[serde_as(unknown1 = "Hello", unknown2 = "World")]
| ^^^^^^^^

error: Unknown field: `unknw2`
--> tests/compile-fail/serde_as.rs:59:35
error: Unknown field: `unknown2`
--> tests/compile-fail/serde_as.rs:59:36
|
59 | #[serde_as(unknwn1 = "Hello", unknw2 = "World")]
| ^^^^^^
59 | #[serde_as(unknown1 = "Hello", unknown2 = "World")]
| ^^^^^^^^

error: Unknown literal value `123`
--> tests/compile-fail/serde_as.rs:67:31
Expand Down

0 comments on commit 2a28e46

Please sign in to comment.