Commit 09d7273
authored
refactor: enhance time management and documentation in cache library (#136)
- Simplified the `duration_to_ticks` function to use `try_from` for better clarity and error handling.
- Improved the `Clock` trait documentation, adding examples for better usability and understanding.
- Updated `StdClock` and `MockClock` implementations with additional examples to demonstrate usage.
- Refined the `ExpirationIndex` to utilize a `Deadline` type instead of `u64`, enhancing type safety and clarity in deadline management.
- Expanded documentation across various components to improve clarity and provide practical examples for users.
These changes enhance the overall usability and maintainability of the cache library, particularly in the context of time-based operations and expiration management.1 parent 6525c38 commit 09d7273
4 files changed
Lines changed: 725 additions & 65 deletions
0 commit comments