Skip to content

Commit

Permalink
Added #[serde(untagged)] to the documentation of attributes that don'…
Browse files Browse the repository at this point in the history
…t work (#486)
  • Loading branch information
VictorKoenders authored Jan 23, 2022
1 parent 0d5433e commit 919ac4f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/features/serde/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,13 @@
//!
//! Currently the `serde` feature will automatically enable the `alloc` and `std` feature. If you're running in a `#[no_std]` environment consider using bincode's own derive macros.
//!
//! Because bincode is a format without meta data, there are several known issues with serde's `skip` attributes. Please do not use `skip` attributes if you plan on using bincode, or use bincode's own `derive` macros.
//!
//! This includes:
//! Because bincode is a format without meta data, there are several known issues with serde's attributes. Please do not use any of the following attributes if you plan on using bincode, or use bincode's own `derive` macros.
//! - `#[serde(skip)]`
//! - `#[serde(skip_serializing)]`
//! - `#[serde(skip_deserializing)]`
//! - `#[serde(skip_serializing_if = "path")]`
//! - `#[serde(flatten)]`
//! - `#[serde(untagged)]`
//!
//! **Using any of the above attributes can and will cause issues with bincode and will result in lost data**. Consider using bincode's own derive macro instead.
//!
Expand Down

0 comments on commit 919ac4f

Please sign in to comment.