527
sub *subscription[T],
528
cvs []ConstrainedValue,
530
>
// Note: This performs the conversion even if the raw value is unchanged. This isn't ideal,
531
>
// but so far constrained default settings are only used for primitive values so it's okay.
532
>
// If we have a constrained default value with a complex conversion function, this could be
533
>
// optimized to delay conversion until after we check DeepEqual.
534
>
newVal, raw := findAndResolveWithConstrainedDefaults(c, key, convert, cvs, sub.cdef, sub.prec)
535
>
536
>
// compare raw (pre-conversion) values, if unchanged, skip this update. note that
537
>
// `usingDefaultValue` is equal to itself but nothing else.
538
>
if reflect.DeepEqual(sub.raw, raw) {
539
>
// make raw field point to new one, not old one, so that old loaded files can get
540
>
// garbage collected.
541
>
sub.raw = raw
542
>
return
543
>
}
544
546
>
go sub.f(newVal)
547
}
548