Fixed errors related to the latest Rust

There are warnings left still, but errors should be fixed by this one.