Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #[macro_use]
- extern crate serde_json; // 1.0.38
- use std::panic::catch_unwind;
- fn main() {
- let c = || serde_json::from_value::<i32>(json!({
- "a": 1
- }));
- println!("{:?}", c());
- println!("{:?}", catch_unwind(c));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement