Update code for new Rust version.
Wrap imports in a mod for unambiguous paths.