diff options
| -rw-r--r-- | skate/zippy.go | 8 | 
1 files changed, 3 insertions, 5 deletions
diff --git a/skate/zippy.go b/skate/zippy.go index 07b61c0..a6c5083 100644 --- a/skate/zippy.go +++ b/skate/zippy.go @@ -399,11 +399,9 @@ func matchedRefsExtend(matched []*BiblioRef, refs []*Ref, stats *statsAugment) [  // list of deserialized bref docs, containing unique matches only (e.g. filter  // out things duplicate matches, e.g. from exact and fuzzy).  func uniqueMatches(docs []string, stats *statsAugment) (result []*BiblioRef, err error) { -	var ( -		brefs []*BiblioRef -		bref  BiblioRef -	) +	var brefs []*BiblioRef  	for _, doc := range docs { +		var bref BiblioRef  		if err := json.Unmarshal([]byte(doc), &bref); err != nil {  			return nil, err  		} @@ -411,7 +409,7 @@ func uniqueMatches(docs []string, stats *statsAugment) (result []*BiblioRef, err  	}  	// Make sure exact matches come first.  	sort.Slice(brefs, func(i, j int) bool { -		return brefs[i].MatchStatus != StatusExact.Short() +		return brefs[i].MatchStatus == StatusExact.Short()  	})  	// We consider a match unique, if source and target match.  	hash := func(bref *BiblioRef) string {  | 
