We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a9320db commit fa6ce42Copy full SHA for fa6ce42
serde/src/lib.rs
@@ -249,6 +249,19 @@ mod lib {
249
pub use self::core::time::Duration;
250
}
251
252
+// None of this crate's error handling needs the `From::from` error conversion
253
+// performed implicitly by the `?` operator or the standard library's `try!`
254
+// macro. This simplified macro gives a 5.5% improvement in compile time
255
+// compared to standard `try!`, and 9% improvement compared to `?`.
256
+macro_rules! try {
257
+ ($expr:expr) => {
258
+ match $expr {
259
+ Ok(val) => val,
260
+ Err(err) => return Err(err),
261
+ }
262
+ };
263
+}
264
+
265
////////////////////////////////////////////////////////////////////////////////
266
267
#[macro_use]
0 commit comments