rustfmt
rustfmt copied to clipboard
Replace wrap_str with validate_shape
This ultimately re-uses Shape::exceeds_max_width_error more to be a tad DRYer.
Would it be simpler to have wrap_str return Result<String, ExceedsMaxWidthError>?
I like how borrowing makes it clear that the string isn't modified personally. But that would be a more conservative change.