mirror of
https://github.com/salsa-rs/salsa.git
synced 2025-01-23 13:10:19 +00:00
permits things to become *more* durable without a "change"
This will be important if we want to automatically upgrade the durability of inputs.
This commit is contained in:
parent
7bf4f9dc4f
commit
86dfdd1fda
1 changed files with 5 additions and 3 deletions
|
@ -219,9 +219,11 @@ where
|
||||||
// old value.
|
// old value.
|
||||||
if let Some(old_memo) = &panic_guard.memo {
|
if let Some(old_memo) = &panic_guard.memo {
|
||||||
if let Some(old_value) = &old_memo.value {
|
if let Some(old_value) = &old_memo.value {
|
||||||
// Careful: the "constant-ness" must also not have
|
// Careful: if the value became less durable than it
|
||||||
// changed, see the test `constant_to_non_constant`.
|
// used to be, that is a "breaking change" that our
|
||||||
if old_memo.durability == result.durability
|
// consumers must be aware of. Becoming *more* durable
|
||||||
|
// is not. See the test `constant_to_non_constant`.
|
||||||
|
if result.durability >= old_memo.durability
|
||||||
&& MP::memoized_value_eq(&old_value, &result.value)
|
&& MP::memoized_value_eq(&old_value, &result.value)
|
||||||
{
|
{
|
||||||
debug!(
|
debug!(
|
||||||
|
|
Loading…
Reference in a new issue