Skip to content

Instantly share code, notes, and snippets.

View Limeth's full-sized avatar
🦀

Jakub Hlusička Limeth

🦀
View GitHub Profile
@Limeth
Limeth / playground.rs
Created July 25, 2016 21:40 — forked from anonymous/playground.rs
Shared via Rust Playground
use std::any::Any;
use std::collections::HashMap;
use std::fmt::Debug;
fn main() {
let mut map: HashMap<(), Box<Fn() -> Box<Any>>> = HashMap::new();
map.insert((), Box::new(|| {
let val: Box<Box<Trait>> = Box::new(Box::new(A));
val
}));