From 94a0819fe3a0d679c3042a77bfe6a2afc505daea Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:11:28 +0200 Subject: Adding upstream version 1.66.0+dfsg1. Signed-off-by: Daniel Baumann --- vendor/serde/src/lib.rs | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'vendor/serde/src/lib.rs') diff --git a/vendor/serde/src/lib.rs b/vendor/serde/src/lib.rs index f1a17513c..02c57ae9d 100644 --- a/vendor/serde/src/lib.rs +++ b/vendor/serde/src/lib.rs @@ -31,8 +31,7 @@ //! for Serde by the community. //! //! - [JSON], the ubiquitous JavaScript Object Notation used by many HTTP APIs. -//! - [Bincode], a compact binary format -//! used for IPC within the Servo rendering engine. +//! - [Postcard], a no\_std and embedded-systems friendly compact binary format. //! - [CBOR], a Concise Binary Object Representation designed for small message //! size without the need for version negotiation. //! - [YAML], a self-proclaimed human-friendly configuration language that ain't @@ -45,7 +44,6 @@ //! - [Avro], a binary format used within Apache Hadoop, with support for schema //! definition. //! - [JSON5], a superset of JSON including some productions from ES5. -//! - [Postcard], a no\_std and embedded-systems friendly compact binary format. //! - [URL] query strings, in the x-www-form-urlencoded format. //! - [Envy], a way to deserialize environment variables into Rust structs. //! *(deserialization only)* @@ -59,7 +57,7 @@ //! and from DynamoDB. //! //! [JSON]: https://github.com/serde-rs/json -//! [Bincode]: https://github.com/bincode-org/bincode +//! [Postcard]: https://github.com/jamesmunns/postcard //! [CBOR]: https://github.com/enarx/ciborium //! [YAML]: https://github.com/dtolnay/serde-yaml //! [MessagePack]: https://github.com/3Hren/msgpack-rust @@ -67,9 +65,8 @@ //! [Pickle]: https://github.com/birkenfeld/serde-pickle //! [RON]: https://github.com/ron-rs/ron //! [BSON]: https://github.com/mongodb/bson-rust -//! [Avro]: https://github.com/flavray/avro-rs +//! [Avro]: https://docs.rs/apache-avro //! [JSON5]: https://github.com/callum-oakley/json5-rs -//! [Postcard]: https://github.com/jamesmunns/postcard //! [URL]: https://docs.rs/serde_qs //! [Envy]: https://github.com/softprops/envy //! [Envy Store]: https://github.com/softprops/envy-store @@ -84,7 +81,7 @@ //////////////////////////////////////////////////////////////////////////////// // Serde types in rustdoc of other crates get linked to here. -#![doc(html_root_url = "https://docs.rs/serde/1.0.140")] +#![doc(html_root_url = "https://docs.rs/serde/1.0.147")] // Support using Serde without the standard library! #![cfg_attr(not(feature = "std"), no_std)] // Unstable functionality only if the user asks for it. For tracking and @@ -252,6 +249,19 @@ mod lib { pub use self::core::time::Duration; } +// None of this crate's error handling needs the `From::from` error conversion +// performed implicitly by the `?` operator or the standard library's `try!` +// macro. This simplified macro gives a 5.5% improvement in compile time +// compared to standard `try!`, and 9% improvement compared to `?`. +macro_rules! try { + ($expr:expr) => { + match $expr { + Ok(val) => val, + Err(err) => return Err(err), + } + }; +} + //////////////////////////////////////////////////////////////////////////////// #[macro_use] -- cgit v1.2.3