Adapt to Rust changes