prevent potential bug in `encode_with_shorthand`.
prevent potential bug in `encode_with_shorthand`.

graydon/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust