Skip to content

Commit

Permalink
Mention serde_as in docstring for 'apply'
Browse files Browse the repository at this point in the history
  • Loading branch information
ancorehraq committed Oct 7, 2023
1 parent 3813ed6 commit 0eb6b17
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions serde_with_macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1194,8 +1194,8 @@ pub fn __private_consume_serde_as_attributes(_: TokenStream) -> TokenStream {
/// Whenever you experience the need to apply the same attributes to multiple fields, you can use
/// this macro. It allows you to specify a list of types and a list of attributes.
/// Each field with a "matching" type will then get the attributes applied.
/// The `apply` attribute must be place *before* any consuming attributes, such as `derive`, because
/// Rust expands all attributes in order.
/// The `apply` attribute must be placed *before* any consuming attributes, such as `derive` or
/// `serde_as`, because Rust expands all attributes in order.
///
/// For example, if your struct or enum contains many `Option<T>` fields, but you do not want to
/// serialize `None` values, you can use this macro to apply the `#[serde(skip_serializing_if =
Expand Down

0 comments on commit 0eb6b17

Please sign in to comment.