def fit

ezx@1.11.0.0 · src/fetch/plan.bend:162

import ezx@1.11.0.0/src/fetch/plan.bend as Plan
import Base
import ezx@1.11.0.0/src/lock/world.bend as W
import ezx@1.11.0.0/src/pkg/pkg.bend as K
import ezx@1.11.0.0/src/share/sha.bend as Sha

162# whether one file is the one the lock names: the same path, and a text whose
163# digest is the sum the lock records
164def fit(want: K.Item, got: W.Source) -> Bool:
165  K.Item{+at, sum} = want
166  W.Source{lat, +text} = got
167  Bool.and(String.eq(lat, at), String.eq(Sha.hex(text), sum))

Uses (6)

Used by (2)