Rust: some improvements