From 93d85261b366b8f49ab3a711c3c4541cf0028701 Mon Sep 17 00:00:00 2001 From: Cerber Ursi Date: Fri, 3 Dec 2021 00:02:46 +0700 Subject: [PATCH] Fixed documentation --- README.md | 1 - src/lib.rs | 4 ---- 2 files changed, 5 deletions(-) diff --git a/README.md b/README.md index 1606824..295b4b2 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,6 @@ or the similar construction using [`lazy_static`](http://crates.io/crates/lazy_s 3. Deserializer isn't implemented. This is intentional, since this crate isn't really intended for runtime usage. Well, in fact, the deserializer *is* implemented - it's just the Rust compiler itself. 4. This serializer is intended for use with derived implementation. It may return bogus results when used with customized `Serialize`. 5. It is impossible to serialize the struct with private fields outside from the module it is defined in. In fact, to be able to serialize this type at all, you'll have to distribute two copies of your crate, one of which would only export the definition with derived `Serialize` to be used by this crate during the build-time of the second copy. (Isn't this a bit too complex?) -6. It is impossible to use empty tuple structs (i.e. `Empty()`). From the Serde's point of view, they are indistinguishable from unit structs (i.e. `Unit`), but the same Rust syntax can't be used for both, and, since ordinary unit structs are much more common, it was decided to abandon the empty tuples. If you find any other case where this doesn't work, feel free to open an issue - we'll either fix the code or document the newly-found limitation. diff --git a/src/lib.rs b/src/lib.rs index deac393..a2b868c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -233,10 +233,6 @@ //! In fact, to be able to use this type with `uneval`, you'll have to distribute two copies of your crate, //! one of which would only export the definition with derived `Serialize` to be used by serializer //! during the build-time of the second copy. (Isn't this a bit too complex?) -//! 4. It is impossible to use empty tuple structs (i.e. `Empty()`). -//! From the Serde's point of view, they are indistinguishable from unit structs (i.e. `Unit`), -//! but the same Rust syntax can't be used for both, and, since ordinary unit structs are much -//! more common, it was decided to correctly handle them. //! //! [include]: https://doc.rust-lang.org/stable/std/macro.include.html