-
-
Notifications
You must be signed in to change notification settings - Fork 706
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
Trivial Improvements To SortedRange #3669
Conversation
JackStouffer
commented
Sep 22, 2015
- removed dead code
- moved imports to local
|
I just tested this and this change fixes Issue 15003 https://issues.dlang.org/show_bug.cgi?id=15003 |
|
OK, so 2 things:
Note: I'm surprised the text(st) doesn't allocate. I would think it would. |
f20f077 to
d69c7b5
Compare
That's because it does. I was running the unit tests for the wrong package. I wonder how many times I have to make that mistake before I stop. However, I believe that my new change to remove the text call here is justified, as just printing out the tested subset of the passed range to the user doesn't make much sense to begin with. Honestly, the question of checking sorted-ness at all in a function called |
d69c7b5 to
3fb4a9e
Compare
It's kind of a strange thing, but I think it's correct. When you are saying The removal of the text function is unfortunate, since it provides a clear idea to the user why the range isn't sorted. I'm wondering whether it would be possible for the compiler to ignore gc-allocating functions inside an assert for |
|
LGTM |
It really should be doing that, like it ignores |
|
|
LGTM |
|
Auto-merge toggled on |
Trivial Improvements To SortedRange