randomairborne / expiringmap

a HashMap-backed TTL map
2 stars 1 forks source link

Update `ExpiringMap::insert` to return the underlying value #6

Open demoray opened 4 months ago

demoray commented 4 months ago

This updates ExpiringMap::insert to work like the rest of the ExpiringMap functions that wrap the underlying HashMap implementation

randomairborne commented 4 months ago

IIRC this was an intentional design decision to allow users to inspect the time at which it would expire.