| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Very well spotted! This looks good as-is. Let's see if Travis succeeds (if it doesn't, I might convert this repo to use bors, but that's my problem, not yours!). |
Sorry, something went wrong.
|
Thanks! EDIT: btw, Travis has moved its domain so I think it won't run at all currently. |
Sorry, something went wrong.
|
We've now enabled bors/buildbot for this repo. Could you rebase this PR against master and force push? Once that's done, we can invoke bors. [Sorry for forcing this extra step on you. I should have enabled bors/buildbot ages ago on this repository, but a combination of laziness and stupidity meant that I didn't do so!] |
Sorry, something went wrong.
…Previously, this could overflow on subtraction.
|
No problem, done! Just let me know if there's anything else. |
Sorry, something went wrong.
|
bors r+ |
Sorry, something went wrong.
|
Build failed: |
Sorry, something went wrong.
… inv_delta(): cargo fmt
|
Sorry, forgot to cargo fmt (done and squashed now). |
Sorry, something went wrong.
|
bors r+ |
Sorry, something went wrong.
|
Hmm, bors seems stuck. bors r- |
Sorry, something went wrong.
|
bors ping |
Sorry, something went wrong.
|
pong |
Sorry, something went wrong.
|
bors r+ |
Sorry, something went wrong.
|
Build succeeded: |
Sorry, something went wrong.
|
Thanks for this! A new release of packedvec will be up shortly (once #38 merges). |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Currently, constructing a new PackedVec from a vector like vec![-2, -1, 0] does not work properly. The reason lies in the computation of delta for both negative min and max arguments.
E.g. delta(-2, -1) is abs(max) - abs(min) which, in this case, overflows since abs(-1) - abs(-2) == -1 is negative but StorageT is bound to be Unsigned.
This PR addresses this by computing delta as abs(max - min) instead.
Corresponding test cases are added as well. From what I can tell, inv_delta was already working correctly as illustrated by a new test case.
Please let me know if I missed important details.