From e2080d71c19b6bfbab29ad36d5e5a7ce5e66197d Mon Sep 17 00:00:00 2001 From: Peter Lithammer Date: Fri, 29 Apr 2022 13:03:19 +0200 Subject: [PATCH] fix: wrap `transform.NopResetter` --- fuzzy/fuzzy.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fuzzy/fuzzy.go b/fuzzy/fuzzy.go index 24e908c..7ae7091 100644 --- a/fuzzy/fuzzy.go +++ b/fuzzy/fuzzy.go @@ -248,7 +248,7 @@ func stringTransform(s string, t transform.Transformer) (transformed string) { return } -type unicodeFoldTransformer struct{} +type unicodeFoldTransformer struct{ transform.NopResetter } func (unicodeFoldTransformer) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { runes := bytes.Runes(src) @@ -266,8 +266,6 @@ func (unicodeFoldTransformer) Transform(dst, src []byte, atEOF bool) (nDst, nSrc return n, n, err } -func (unicodeFoldTransformer) Reset() {} - type nopTransformer struct{ transform.NopResetter } func (nopTransformer) Transform(dst []byte, src []byte, atEOF bool) (int, int, error) {