message: improve style in catch_panic test
diff: @@ -70,18 +70,14 @@ fn test(do_panic: impl FnOnce(usize) -> !) {
  do_panic_counter(do_panic)
  })).expect_err("do_panic() did not panic!");
  - // See if we can extract panic message.
  - match res.downcast::<String>() {
  - Ok(s) => {
  + // See if we can extract the panic message.
  + if let Some(s) = res.downcast_ref::<String>() {
  eprintln!("Caught panic message (String): {}", s);
  - }
  - Err(res) =>
  - if let Ok(s) = res.downcast::<&str>() {
  + } else if let Some(s) = res.downcast_ref::<&str>() {
  eprintln!("Caught panic message (&str): {}", s);
  } else {
  eprintln!("Failed get caught panic message.");
  }
  - }
  // Test flags.
  assert!(DROPPED.with(|c| c.get()));
  