diff --git a/macros/src/memoize.rs b/macros/src/memoize.rs index d6c0b10..09afbce 100644 --- a/macros/src/memoize.rs +++ b/macros/src/memoize.rs @@ -130,7 +130,7 @@ fn process(function: &Function) -> Result { #output, > = ::comemo::internal::Cache::new(|| { ::comemo::internal::register_evictor(|max_age| __CACHE.evict(max_age)); - ::std::default::Default::default() + ::core::default::Default::default() }); #(#bounds;)* diff --git a/macros/src/track.rs b/macros/src/track.rs index e0db944..bfc90be 100644 --- a/macros/src/track.rs +++ b/macros/src/track.rs @@ -213,7 +213,6 @@ fn create_variants(methods: &[Method]) -> TokenStream { enum __ComemoVariant { #(#variants,)* } - } } @@ -291,6 +290,7 @@ fn create( } else { quote! { MutableConstraint } }; + Ok(quote! { impl #impl_params ::comemo::Track for #ty #where_clause {} diff --git a/src/constraint.rs b/src/constraint.rs index bec98aa..6af0732 100644 --- a/src/constraint.rs +++ b/src/constraint.rs @@ -135,9 +135,9 @@ impl MutableConstraint { where F: FnMut(&T), { - for call in &self.0.read().0 { - if call.call.is_mutable() { - f(&call.call); + for entry in &self.0.read().0 { + if entry.call.is_mutable() { + f(&entry.call); } } } @@ -245,8 +245,8 @@ impl Join for ImmutableConstraint { #[inline] fn join(&self, inner: &Self) { let mut this = self.0.write(); - for call in inner.0.read().0.values() { - this.push_inner(Cow::Borrowed(call)); + for entry in inner.0.read().0.values() { + this.push_inner(Cow::Borrowed(entry)); } } @@ -260,8 +260,8 @@ impl Join for MutableConstraint { #[inline] fn join(&self, inner: &Self) { let mut this = self.0.write(); - for call in inner.0.read().0.iter() { - this.push_inner(Cow::Borrowed(call)); + for entry in inner.0.read().0.iter() { + this.push_inner(Cow::Borrowed(entry)); } }