summaryrefslogtreecommitdiffstats
path: root/vendor/serde/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/serde/src/lib.rs')
-rw-r--r--vendor/serde/src/lib.rs17
1 files changed, 15 insertions, 2 deletions
diff --git a/vendor/serde/src/lib.rs b/vendor/serde/src/lib.rs
index f2b28d985..02c57ae9d 100644
--- a/vendor/serde/src/lib.rs
+++ b/vendor/serde/src/lib.rs
@@ -65,7 +65,7 @@
//! [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
//! [URL]: https://docs.rs/serde_qs
//! [Envy]: https://github.com/softprops/envy
@@ -81,7 +81,7 @@
////////////////////////////////////////////////////////////////////////////////
// Serde types in rustdoc of other crates get linked to here.
-#![doc(html_root_url = "https://docs.rs/serde/1.0.143")]
+#![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
@@ -249,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]