Skip to content

Conversation

@Wilfred
Copy link
Owner

@Wilfred Wilfred commented Nov 28, 2025

No description provided.

Previously, nn only processed the first line from stdin using lines.next().
Now it loops through all lines, processing each non-empty line separately.

This allows users to pipe multiple lines of input and have each line
formatted independently.
Modified stdin processing to print blank lines as-is rather than
skipping them. This maintains the original formatting of the input
while still processing all non-empty lines.
Replace nested if-let with map_while(Result::ok) as suggested by clippy.
This avoids potential infinite loops on repeated I/O errors and is more
idiomatic Rust.
@Wilfred Wilfred merged commit 0a00f05 into main Nov 28, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants