diff options
Diffstat (limited to 'vendor/serde_ignored/src')
-rw-r--r-- | vendor/serde_ignored/src/lib.rs | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/vendor/serde_ignored/src/lib.rs b/vendor/serde_ignored/src/lib.rs index c415dca07..3ed3e24e2 100644 --- a/vendor/serde_ignored/src/lib.rs +++ b/vendor/serde_ignored/src/lib.rs @@ -2,7 +2,7 @@ //! //! [github]: https://img.shields.io/badge/github-8da0cb?style=for-the-badge&labelColor=555555&logo=github //! [crates-io]: https://img.shields.io/badge/crates.io-fc8d62?style=for-the-badge&labelColor=555555&logo=rust -//! [docs-rs]: https://img.shields.io/badge/docs.rs-66c2a5?style=for-the-badge&labelColor=555555&logoColor=white&logo=data:image/svg+xml;base64,PHN2ZyByb2xlPSJpbWciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDUxMiA1MTIiPjxwYXRoIGZpbGw9IiNmNWY1ZjUiIGQ9Ik00ODguNiAyNTAuMkwzOTIgMjE0VjEwNS41YzAtMTUtOS4zLTI4LjQtMjMuNC0zMy43bC0xMDAtMzcuNWMtOC4xLTMuMS0xNy4xLTMuMS0yNS4zIDBsLTEwMCAzNy41Yy0xNC4xIDUuMy0yMy40IDE4LjctMjMuNCAzMy43VjIxNGwtOTYuNiAzNi4yQzkuMyAyNTUuNSAwIDI2OC45IDAgMjgzLjlWMzk0YzAgMTMuNiA3LjcgMjYuMSAxOS45IDMyLjJsMTAwIDUwYzEwLjEgNS4xIDIyLjEgNS4xIDMyLjIgMGwxMDMuOS01MiAxMDMuOSA1MmMxMC4xIDUuMSAyMi4xIDUuMSAzMi4yIDBsMTAwLTUwYzEyLjItNi4xIDE5LjktMTguNiAxOS45LTMyLjJWMjgzLjljMC0xNS05LjMtMjguNC0yMy40LTMzLjd6TTM1OCAyMTQuOGwtODUgMzEuOXYtNjguMmw4NS0zN3Y3My4zek0xNTQgMTA0LjFsMTAyLTM4LjIgMTAyIDM4LjJ2LjZsLTEwMiA0MS40LTEwMi00MS40di0uNnptODQgMjkxLjFsLTg1IDQyLjV2LTc5LjFsODUtMzguOHY3NS40em0wLTExMmwtMTAyIDQxLjQtMTAyLTQxLjR2LS42bDEwMi0zOC4yIDEwMiAzOC4ydi42em0yNDAgMTEybC04NSA0Mi41di03OS4xbDg1LTM4Ljh2NzUuNHptMC0xMTJsLTEwMiA0MS40LTEwMi00MS40di0uNmwxMDItMzguMiAxMDIgMzguMnYuNnoiPjwvcGF0aD48L3N2Zz4K +//! [docs-rs]: https://img.shields.io/badge/docs.rs-66c2a5?style=for-the-badge&labelColor=555555&logo=docs.rs //! //! <br> //! @@ -85,10 +85,17 @@ //! # fn main() { try_main().unwrap() } //! ``` -#![doc(html_root_url = "https://docs.rs/serde_ignored/0.1.2")] +#![no_std] +#![doc(html_root_url = "https://docs.rs/serde_ignored/0.1.7")] +#![allow(clippy::missing_errors_doc)] +extern crate alloc; + +use alloc::borrow::ToOwned; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::fmt::{self, Display}; use serde::de::{self, Deserialize, DeserializeSeed, Visitor}; -use std::fmt::{self, Display}; /// Entry point. See crate documentation for an example. pub fn deserialize<'de, D, F, T>(deserializer: D, mut callback: F) -> Result<T, D::Error> @@ -430,6 +437,10 @@ where self.de .deserialize_identifier(Wrap::new(visitor, self.callback, &self.path)) } + + fn is_human_readable(&self) -> bool { + self.de.is_human_readable() + } } /// Wrapper that attaches context to a `Visitor`, `SeqAccess`, `EnumAccess` or @@ -650,10 +661,10 @@ where } /// Forwarding impl to preserve context. -impl<'a, 'b, 'de, X: 'a, F: 'b> de::EnumAccess<'de> for Wrap<'a, 'b, X, F> +impl<'a, 'b, 'de, X, F> de::EnumAccess<'de> for Wrap<'a, 'b, X, F> where - X: de::EnumAccess<'de>, - F: FnMut(Path), + X: de::EnumAccess<'de> + 'a, + F: FnMut(Path) + 'b, { type Error = X::Error; type Variant = Wrap<'a, 'b, X::Variant, F>; @@ -1002,6 +1013,10 @@ where self.delegate .deserialize_identifier(CaptureKey::new(visitor, self.key)) } + + fn is_human_readable(&self) -> bool { + self.delegate.is_human_readable() + } } /// Forwarding impl that also saves the value of integers and strings. @@ -1157,7 +1172,8 @@ where where D: de::Deserializer<'de>, { - self.delegate.visit_newtype_struct(CaptureKey::new(deserializer, self.key)) + self.delegate + .visit_newtype_struct(CaptureKey::new(deserializer, self.key)) } fn visit_seq<V>(self, visitor: V) -> Result<Self::Value, V::Error> |