Resolve nightly clippy errors in hashx.
Nightly clippy doesn't like using "expr as T" when the conversion is lossless; it prefers "T::from(expr)" so that if we later change the type of T to something with a lossy conversion, we'll know.
Nightly clippy doesn't like using "expr as T" when the conversion is lossless; it prefers "T::from(expr)" so that if we later change the type of T to something with a lossy conversion, we'll know.