diff --git a/.typos.toml b/.typos.toml new file mode 100644 index 00000000..a80106fa --- /dev/null +++ b/.typos.toml @@ -0,0 +1,2 @@ +[default.extend-words] +Algorythm = "Algorythm" diff --git a/serde_with/CHANGELOG.md b/serde_with/CHANGELOG.md index 22153865..84c68f17 100644 --- a/serde_with/CHANGELOG.md +++ b/serde_with/CHANGELOG.md @@ -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)] diff --git a/serde_with/src/guide/serde_as.md b/serde_with/src/guide/serde_as.md index 46f56ea2..cadf2006 100644 --- a/serde_with/src/guide/serde_as.md +++ b/serde_with/src/guide/serde_as.md @@ -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")] - // 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, } diff --git a/serde_with_macros/tests/compile-fail/serde_as.rs b/serde_with_macros/tests/compile-fail/serde_as.rs index 122257b6..f681f3ee 100644 --- a/serde_with_macros/tests/compile-fail/serde_as.rs +++ b/serde_with_macros/tests/compile-fail/serde_as.rs @@ -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 diff --git a/serde_with_macros/tests/compile-fail/serde_as.stderr b/serde_with_macros/tests/compile-fail/serde_as.stderr index d6f1e296..3aee0b33 100644 --- a/serde_with_macros/tests/compile-fail/serde_as.stderr +++ b/serde_with_macros/tests/compile-fail/serde_as.stderr @@ -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