Upgrade Mac code for new Rust