Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

writeln!(stderr, ...) -> eprintln! #644

Merged
merged 1 commit into from Dec 13, 2017

Conversation

AgustinCB
Copy link
Contributor

While working in other tasks, I noticed that there's a rather
inconsistent way to handle errors. In some places we use eprintln! and
in others writeln! to standard error.

It seems like the use of writeln! don't have an strong motive, as the
output is always to standard error, the lock is always handled the same
than eprintln and there's no obvious (to me) optimization, so I
decided to use the more idiomatic eprintln! everywhere.

Let me know if there's seomthing I'm missing!

While working in other tasks, I noticed that there's a rather
inconsistent way to handle errors. In some places we use `eprintln!` and
in others `writeln!` to standard error.

It seems like the use of `writeln!` don't have an strong motive, as the
output is always to standard error, the lock is always handled the same
than `eprintln` and there's no obvious (to me) optimization, so I
decided to use the more idiomatic `eprintln!` everywhere.
@mmstick mmstick merged commit cf2cee1 into redox-os:master Dec 13, 2017
@mmstick
Copy link
Contributor

mmstick commented Dec 13, 2017

Thanks! The reason they were in use was because Ion began development at a time when the eprintln macro did not exist, so there's a mixture of eprintln and writeln.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants