maidsafe / lru_time_cache

LRU cache settable via size or time to live
BSD 3-Clause "New" or "Revised" License
104 stars 46 forks source link

Corrected regression tests panicking on an arithmetic operation overflow #69

Closed Thierry61 closed 8 years ago

Thierry61 commented 8 years ago

This PR corrects the bug I mentioned about lru_time_cache crate in SAFE Network Forum.

The problem was that the maximum value for the nanos part of a duration is not std::u32::MAX but rather 999_999_999.


This change is Reviewable

maidsafe-highfive commented 8 years ago

Thanks for the pull request, and welcome! The MaidSafe team is excited to review your changes, and you should hear from @Fraser999 (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. The way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see CONTRIBUTOR.md for more information.

dirvine commented 8 years ago

Thanks for this, nice catch.


Review status: 0 of 1 files reviewed at latest revision, all discussions resolved.


_Comments from Reviewable_

dirvine commented 8 years ago

Reviewed 1 of 1 files at r1. Review status: all files reviewed at latest revision, all discussions resolved.


_Comments from Reviewable_