The function had two branches that both returned line.to_string(): - when !should_truncate - when line.chars().count() <= max_width Merged into a single condition. Also updated format! to use inline variable syntax per clippy suggestion. Agent: fowler