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
Remove unused debug writelns in std.algorithm #5180
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume that this cruft is a relict from times in which D wasn't that stable, so I leave this to someone with a longer history to sign off.
FWIW I think that a beautiful language (and D tries to be one) shouldn't require such redundancy for such a "simple" feature of reporting unittest results.
I am still hoping to see DIP83 come alive at some point...
std/algorithm/mutation.d
Outdated
a = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]; | ||
assert(remove!(SwapStrategy.stable)(a, 1, 3, 5) | ||
== [ 0, 2, 4, 6, 7, 8, 9, 10]); | ||
a = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]; | ||
//writeln(remove!(SwapStrategy.stable)(a, 1, tuple(3, 5))); | ||
a = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line can then be removed as well?
std/algorithm/mutation.d
Outdated
a = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]; | ||
assert(remove!(SwapStrategy.stable)(a, 1, 5) == | ||
[ 0, 2, 3, 4, 6, 7, 8, 9, 10 ]); | ||
|
||
a = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]; | ||
//writeln(remove!(SwapStrategy.stable)(a, 1, 3, 5)); | ||
a = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line can then be removed as well?
std/algorithm/mutation.d
Outdated
@@ -1871,18 +1850,15 @@ if (s == SwapStrategy.stable | |||
[ 1, 2, 4 ]); | |||
|
|||
a = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]; | |||
//writeln(remove!(SwapStrategy.stable)(a, 1, 5)); | |||
a = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line can then be removed as well?
5b953ed
to
9214a85
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is harmless and won't break any existing PR on the same module
That code was mightily useful back in the days when dmd had more bugs than features :) |
9214a85
to
2e90b8b
Compare
Auto-merge toggled on |
These didn't even work because std.stdio wasn't imported. I highly doubt anyone was using them, and they're not particularly useful anyway.