Skip to content

Instantly share code, notes, and snippets.

View RShergold's full-sized avatar
💭
Currently alive

Remi Shergold RShergold

💭
Currently alive
View GitHub Profile
@smertelny
smertelny / chapter-13.rs
Created October 27, 2019 06:35
Rust book Chapter 13. Casher with HashMap
use std::collections::HashMap;
use std::thread;
use std::time::Duration;
struct Casher<T, K, V>
where
T: Fn(K) -> V,
{
calculation: T,
value: HashMap<K, V>,