Rollup merge of #38225 - Cobrand:patch-1, r=GuillaumeGomez
Rollup merge of #38225 - Cobrand:patch-1, r=GuillaumeGomez

Update book/ffi to use catch_unwind

r? @GuillaumeGomez

The doc mentioned to spawn a new thread instead of using catch_unwind, which has been the recommended way to catch panics for foreign function interfaces for a few releases now.

This commit fixes that.

GBGamer/rust,aidancully/rust,aidancully/rust,GBGamer/rust,aidancully/rust,graydon/rust,aidancully/rust,graydon/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,graydon/rust,GBGamer/rust,graydon/rust,aidancully/rust,graydon/rust,graydon/rust,GBGamer/rust,GBGamer/rust