<!-- Hi there! Whether you've come to make a suggestion for a new lint, an improvement to an existing lint or to report a bug or a false positive in Clippy, you've come to the right place. Write your comment below this line: --> Is there a better way to [delegate the body of a method to a parameter](https://github.com/tormol/encode_unicode/blob/15d1c1eed1f94d34ac78d0c8eac29bd6c7aa676c/src/errors.rs#L17)?