Rust upgrade: Remove unused transmute call
Upgrade main
Upgrade tests