Update for latest rust.

to_byte -> as_byte,
Equiv doesn't exist any more, so don't use a trait on the test result.