mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-25 01:01:34 +11:00
Sized is implied
This commit is contained in:
parent
a6c7eaec1a
commit
89cc00f8cf
|
@ -8,18 +8,14 @@ use rustc_hash::FxHasher;
|
||||||
|
|
||||||
type HashType = u32;
|
type HashType = u32;
|
||||||
|
|
||||||
struct Node<K: Sized, V: Sized> {
|
struct Node<K, V> {
|
||||||
hash: HashType,
|
hash: HashType,
|
||||||
distance_to_initial_bucket: u32,
|
distance_to_initial_bucket: u32,
|
||||||
key: K,
|
key: K,
|
||||||
value: V,
|
value: V,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<K, V> Node<K, V>
|
impl<K, V> Node<K, V> {
|
||||||
where
|
|
||||||
K: Sized,
|
|
||||||
V: Sized,
|
|
||||||
{
|
|
||||||
fn with_new_key_value(self, new_key: K, new_value: V) -> (Self, V) {
|
fn with_new_key_value(self, new_key: K, new_value: V) -> (Self, V) {
|
||||||
(
|
(
|
||||||
Self {
|
Self {
|
||||||
|
|
Loading…
Reference in a new issue