Rust upgrade: util crate

This fixes the errors from the util crate.

There are still a couple of `warning: use of deprecated item: casting &T to &mut T is undefined behaviour: use Cell<T>, RefCell<T> or Unsafe<T>` warnings which I'll work on later.

I'm not very sure of the Show and Result commits -- as far as I can tell the changes are correct, but I might have missed something.