You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace HashMap<&'static str, Box<Any>> with TypeMap.
TypeMap is a thin wrapper around `HashMap<TypeId, Box<Any>>` and is meant
to be a key-value store for up to one value of each type. It enables type-safe
extensions to Request and provides a much friendlier interface than the map
it is replacing, which called on users to do runtime downcasting.
@wycats If you want to make this slightly faster we can depend on
https://github.com/reem/rust-unsafe-any, but I think the real speed boost
comes from implementing a specific hasher for TypeId.
0 commit comments