rustfmt: Make error handling more idiomatic
rustfmt: Make error handling more idiomatic

This commit replaces the `Operation::InvalidInput` variant with
`Result`, and uses the `try!()` macro instead of explicit matching.

studoot/rustfmt,graydon/rust,aidancully/rust,SingingTree/rustfmt,rust-lang/rustfmt,Emilgardis/rustfmt,aidancully/rust,graydon/rust,Emilgardis/rustfmt,studoot/rustfmt,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust,flutterhash/rustfmt,graydon/rust,graydon/rust,aidancully/rust,SingingTree/rustfmt,rust-lang/rustfmt,graydon/rust