From 919ac4fbcbe5386dcfa627e582ca151a824be698 Mon Sep 17 00:00:00 2001 From: Trangar Date: Sun, 23 Jan 2022 10:05:54 +0100 Subject: [PATCH] Added #[serde(untagged)] to the documentation of attributes that don't work (#486) --- src/features/serde/mod.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/features/serde/mod.rs b/src/features/serde/mod.rs index a8f8db96..08e07215 100644 --- a/src/features/serde/mod.rs +++ b/src/features/serde/mod.rs @@ -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. //!