rustywind icon indicating copy to clipboard operation
rustywind copied to clipboard

When used with `--stdin` option the newline is removed at the end of a file

Open artemkovalyov opened this issue 2 years ago • 0 comments

When trying to integrate and contribute Rustywind to Aphelia I faced an issue that when I run Rustywind with --stdin option it removes the new line symbol at the end of the formatted file. This is incorrect behavior as by Unix standard the new line should be always present.

This fails my tests when adding Rustywind to formatters. This should be a rather easy fix. Can you take a look?

When used with the --write option the \n is added correctly as it seems the println! macro is used instead of print!

I think this PR should fix it: https://github.com/avencera/rustywind/pull/63

artemkovalyov avatar Jul 25 '22 09:07 artemkovalyov