From e6ca4ff8108a80c3da38460b9b2fcc0b41f86c56 Mon Sep 17 00:00:00 2001 From: Zeeshan Ali Khan Date: Wed, 6 Aug 2025 15:54:47 +0200 Subject: [PATCH] Clarify that only deserialization of enums require alloc The current wording gives the impression that both serialization and deserialization of enums require alloc, while only the latter requires it. So let's make the wording a bit clearer. --- _src/enum-representations.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_src/enum-representations.md b/_src/enum-representations.md index c5a8355..6cee8cf 100644 --- a/_src/enum-representations.md +++ b/_src/enum-representations.md @@ -40,8 +40,8 @@ In JSON and other self-describing formats, the externally tagged representation is often not ideal for readability. Serde provides attributes to select three other possible representations. -All enum representations work in no-std projects, but externally tagged is the -only one that works in no-alloc projects. +All enum representations work in no-std projects, but with the exception of externally tagged +representation, `Deserialize` requires alloc. ## Internally tagged