Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Derive Debug for FontGroup and Homu is a bully #9013

Merged
merged 2 commits into from Dec 18, 2015
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Next

HashCache: Apply trait bounds on type itself, rather than only the impl

I don't think there is any reason to keep the container more generic
than its (only) implementation -- the constraints are necessary for this
container to work at all.

Defining the constraints on the type itself also enables use
of #[derive(Debug)].
  • Loading branch information
antrik committed Dec 12, 2015
commit 3d078f7c6420526d47bd50c06217b2feaab35cb2
@@ -12,7 +12,10 @@ use std::hash::{Hash, Hasher, SipHasher};
use std::slice::Iter;


pub struct HashCache<K, V> {
pub struct HashCache<K, V>
where K: Clone + PartialEq + Eq + Hash,
V: Clone,
{
entries: HashMap<K, V, DefaultState<SipHasher>>,
}

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.