Updates to work on a newer Rust version

Various updates to work on Rust #80878ff369cabc63967a6ebfd69f3e5fa692ceff.