summaryrefslogtreecommitdiffstats
path: root/vendor/serde_ignored
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:50 +0000
commit9835e2ae736235810b4ea1c162ca5e65c547e770 (patch)
tree3fcebf40ed70e581d776a8a4c65923e8ec20e026 /vendor/serde_ignored
parentReleasing progress-linux version 1.70.0+dfsg2-1~progress7.99u1. (diff)
downloadrustc-9835e2ae736235810b4ea1c162ca5e65c547e770.tar.xz
rustc-9835e2ae736235810b4ea1c162ca5e65c547e770.zip
Merging upstream version 1.71.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/serde_ignored')
-rw-r--r--vendor/serde_ignored/.cargo-checksum.json2
-rw-r--r--vendor/serde_ignored/Cargo.toml30
-rw-r--r--vendor/serde_ignored/LICENSE-APACHE25
-rw-r--r--vendor/serde_ignored/LICENSE-MIT2
-rw-r--r--vendor/serde_ignored/README.md4
-rw-r--r--vendor/serde_ignored/src/lib.rs30
-rw-r--r--vendor/serde_ignored/tests/test.rs10
7 files changed, 57 insertions, 46 deletions
diff --git a/vendor/serde_ignored/.cargo-checksum.json b/vendor/serde_ignored/.cargo-checksum.json
index a0a56de16..c1321022b 100644
--- a/vendor/serde_ignored/.cargo-checksum.json
+++ b/vendor/serde_ignored/.cargo-checksum.json
@@ -1 +1 @@
-{"files":{"Cargo.toml":"fae104c28a04d607c0996cdb9f792a82d5b0781cb31044142b56b760fdca4392","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"8dc5d3a00ef6fa428f2ca3d9bf5e99a7e2569a876d28f2ac0b31f82cf3b9d612","src/lib.rs":"6987322716f81282caa6c1109ab2beb715299e0cbd49103e066805894eb982e1","tests/test.rs":"3dbb831ab9bfc8e91529d95d7c61ebbe1844a409a240d1b777c5f304aa00e216"},"package":"1c2c7d39d14f2f2ea82239de71594782f186fd03501ac81f0ce08e674819ff2f"} \ No newline at end of file
+{"files":{"Cargo.toml":"76d12bd7138cd927c322aee229374cc410c22ea62ce3fda30eb0c31a7a13251d","LICENSE-APACHE":"62c7a1e35f56406896d7aa7ca52d0cc0d272ac022b5d2796e7d6905db8a3636a","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"6742c60015b07cf7d49e8ab39ab10bc3d7154cd2a1f66010abb14350463b7624","src/lib.rs":"b6c13a01a694937a0c8c1fe758a22feac45f48a30a003d424b2063ab8b67490b","tests/test.rs":"706c6a9d031f1f014f2b5d35020039533b15c0996a902e036761088a48702f39"},"package":"94eb4a4087ba8bdf14a9208ac44fddbf55c01a6195f7edfc511ddaff6cae45a6"} \ No newline at end of file
diff --git a/vendor/serde_ignored/Cargo.toml b/vendor/serde_ignored/Cargo.toml
index 9b93fc748..bebf48bfc 100644
--- a/vendor/serde_ignored/Cargo.toml
+++ b/vendor/serde_ignored/Cargo.toml
@@ -3,28 +3,42 @@
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
-# to registry (e.g., crates.io) dependencies
+# to registry (e.g., crates.io) dependencies.
#
-# If you believe there's an error in this file please file an
-# issue against the rust-lang/cargo repository. If you're
-# editing this file be aware that the upstream Cargo.toml
-# will likely look very different (and much more reasonable)
+# If you are reading this file be aware that the original Cargo.toml
+# will likely look very different (and much more reasonable).
+# See Cargo.toml.orig for the original contents.
[package]
edition = "2018"
+rust-version = "1.36"
name = "serde_ignored"
-version = "0.1.2"
+version = "0.1.7"
authors = ["David Tolnay <dtolnay@gmail.com>"]
description = "Find out about keys that are ignored when deserializing data"
readme = "README.md"
-keywords = ["serde"]
-categories = ["encoding"]
+keywords = [
+ "serde",
+ "serialization",
+]
+categories = [
+ "encoding",
+ "no-std",
+]
license = "MIT OR Apache-2.0"
repository = "https://github.com/dtolnay/serde-ignored"
+
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
+
+[lib]
+doc-scrape-examples = false
+
[dependencies.serde]
version = "1.0"
+features = ["alloc"]
+default-features = false
+
[dev-dependencies.serde_derive]
version = "1.0"
diff --git a/vendor/serde_ignored/LICENSE-APACHE b/vendor/serde_ignored/LICENSE-APACHE
index 16fe87b06..1b5ec8b78 100644
--- a/vendor/serde_ignored/LICENSE-APACHE
+++ b/vendor/serde_ignored/LICENSE-APACHE
@@ -174,28 +174,3 @@ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
-
-APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
-Copyright [yyyy] [name of copyright owner]
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
diff --git a/vendor/serde_ignored/LICENSE-MIT b/vendor/serde_ignored/LICENSE-MIT
index 39d4bdb5a..31aa79387 100644
--- a/vendor/serde_ignored/LICENSE-MIT
+++ b/vendor/serde_ignored/LICENSE-MIT
@@ -1,5 +1,3 @@
-Copyright (c) 2014 The Rust Project Developers
-
Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the
diff --git a/vendor/serde_ignored/README.md b/vendor/serde_ignored/README.md
index 659e3aeac..d3e6faa17 100644
--- a/vendor/serde_ignored/README.md
+++ b/vendor/serde_ignored/README.md
@@ -2,8 +2,8 @@
[<img alt="github" src="https://img.shields.io/badge/github-dtolnay/serde--ignored-8da0cb?style=for-the-badge&labelColor=555555&logo=github" height="20">](https://github.com/dtolnay/serde-ignored)
[<img alt="crates.io" src="https://img.shields.io/crates/v/serde_ignored.svg?style=for-the-badge&color=fc8d62&logo=rust" height="20">](https://crates.io/crates/serde_ignored)
-[<img alt="docs.rs" src="https://img.shields.io/badge/docs.rs-serde__ignored-66c2a5?style=for-the-badge&labelColor=555555&logoColor=white&logo=data:image/svg+xml;base64,PHN2ZyByb2xlPSJpbWciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDUxMiA1MTIiPjxwYXRoIGZpbGw9IiNmNWY1ZjUiIGQ9Ik00ODguNiAyNTAuMkwzOTIgMjE0VjEwNS41YzAtMTUtOS4zLTI4LjQtMjMuNC0zMy43bC0xMDAtMzcuNWMtOC4xLTMuMS0xNy4xLTMuMS0yNS4zIDBsLTEwMCAzNy41Yy0xNC4xIDUuMy0yMy40IDE4LjctMjMuNCAzMy43VjIxNGwtOTYuNiAzNi4yQzkuMyAyNTUuNSAwIDI2OC45IDAgMjgzLjlWMzk0YzAgMTMuNiA3LjcgMjYuMSAxOS45IDMyLjJsMTAwIDUwYzEwLjEgNS4xIDIyLjEgNS4xIDMyLjIgMGwxMDMuOS01MiAxMDMuOSA1MmMxMC4xIDUuMSAyMi4xIDUuMSAzMi4yIDBsMTAwLTUwYzEyLjItNi4xIDE5LjktMTguNiAxOS45LTMyLjJWMjgzLjljMC0xNS05LjMtMjguNC0yMy40LTMzLjd6TTM1OCAyMTQuOGwtODUgMzEuOXYtNjguMmw4NS0zN3Y3My4zek0xNTQgMTA0LjFsMTAyLTM4LjIgMTAyIDM4LjJ2LjZsLTEwMiA0MS40LTEwMi00MS40di0uNnptODQgMjkxLjFsLTg1IDQyLjV2LTc5LjFsODUtMzguOHY3NS40em0wLTExMmwtMTAyIDQxLjQtMTAyLTQxLjR2LS42bDEwMi0zOC4yIDEwMiAzOC4ydi42em0yNDAgMTEybC04NSA0Mi41di03OS4xbDg1LTM4Ljh2NzUuNHptMC0xMTJsLTEwMiA0MS40LTEwMi00MS40di0uNmwxMDItMzguMiAxMDIgMzguMnYuNnoiPjwvcGF0aD48L3N2Zz4K" height="20">](https://docs.rs/serde_ignored)
-[<img alt="build status" src="https://img.shields.io/github/workflow/status/dtolnay/serde-ignored/CI/master?style=for-the-badge" height="20">](https://github.com/dtolnay/serde-ignored/actions?query=branch%3Amaster)
+[<img alt="docs.rs" src="https://img.shields.io/badge/docs.rs-serde__ignored-66c2a5?style=for-the-badge&labelColor=555555&logo=docs.rs" height="20">](https://docs.rs/serde_ignored)
+[<img alt="build status" src="https://img.shields.io/github/actions/workflow/status/dtolnay/serde-ignored/ci.yml?branch=master&style=for-the-badge" height="20">](https://github.com/dtolnay/serde-ignored/actions?query=branch%3Amaster)
Find out about keys that are ignored when deserializing data. This crate
provides a wrapper that works with any existing Serde `Deserializer` and invokes
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>
diff --git a/vendor/serde_ignored/tests/test.rs b/vendor/serde_ignored/tests/test.rs
index 414fe691b..ce7a2bf21 100644
--- a/vendor/serde_ignored/tests/test.rs
+++ b/vendor/serde_ignored/tests/test.rs
@@ -1,3 +1,9 @@
+#![allow(
+ clippy::derive_partial_eq_without_eq,
+ clippy::from_iter_instead_of_collect,
+ clippy::zero_sized_map_values
+)]
+
use serde::Deserialize;
use serde_derive::Deserialize;
use std::collections::{BTreeMap as Map, BTreeSet as Set};
@@ -16,7 +22,7 @@ where
})
.unwrap();
- let expected = Set::from_iter(expected.into_iter().cloned().map(str::to_owned));
+ let expected = Set::from_iter(expected.iter().copied().map(str::to_owned));
assert_eq!(unused, expected);
value
@@ -24,6 +30,7 @@ where
#[derive(Debug, Deserialize)]
struct V {
+ #[allow(dead_code)]
used: (),
}
@@ -77,6 +84,7 @@ fn test_readme() {
fn test_int_key() {
#[derive(Debug, Deserialize)]
struct Test {
+ #[allow(dead_code)]
a: Map<usize, V>,
}