]> git.proxmox.com Git - rustc.git/blobdiff - vendor/serde/src/de/mod.rs
New upstream version 1.66.0+dfsg1
[rustc.git] / vendor / serde / src / de / mod.rs
index e8a47cfc17e81f71a56c575b4385f3db6342121c..d9dafbe1e9ecca50c8577bf441a38c40088f28ad 100644 (file)
@@ -565,7 +565,7 @@ pub trait Deserialize<'de>: Sized {
         D: Deserializer<'de>,
     {
         // Default implementation just delegates to `deserialize` impl.
-        *place = Deserialize::deserialize(deserializer)?;
+        *place = try!(Deserialize::deserialize(deserializer));
         Ok(())
     }
 }
@@ -862,10 +862,10 @@ where
 /// The `Deserializer` trait supports two entry point styles which enables
 /// different kinds of deserialization.
 ///
-/// 1. The `deserialize` method. Self-describing data formats like JSON are able
-///    to look at the serialized data and tell what it represents. For example
-///    the JSON deserializer may see an opening curly brace (`{`) and know that
-///    it is seeing a map. If the data format supports
+/// 1. The `deserialize_any` method. Self-describing data formats like JSON are
+///    able to look at the serialized data and tell what it represents. For
+///    example the JSON deserializer may see an opening curly brace (`{`) and
+///    know that it is seeing a map. If the data format supports
 ///    `Deserializer::deserialize_any`, it will drive the Visitor using whatever
 ///    type it sees in the input. JSON uses this approach when deserializing
 ///    `serde_json::Value` which is an enum that can represent any JSON