Attempting to create a HeaderName longer than 64KiB fails, but with a panic rather than an InvalidHeaderName error: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=f43aad9f01cc5c1bd05149129310c7e7
I think this should return Err(InvalidHeaderName) instead, but if there is good cause to keep it as a panic, that panic should be documented on the various constructors so it's less of a surprise.
If you agree about switching to the Err behavior, I'd be happy to put in a PR.