diff --git a/internal/restic/id.go b/internal/restic/id.go index 6d85ed68a..5a25e0ebe 100644 --- a/internal/restic/id.go +++ b/internal/restic/id.go @@ -82,19 +82,6 @@ func (id ID) Equal(other ID) bool { return id == other } -// EqualString compares this ID to another one, given as a string. -func (id ID) EqualString(other string) (bool, error) { - s, err := hex.DecodeString(other) - if err != nil { - return false, errors.Wrap(err, "hex.DecodeString") - } - - id2 := ID{} - copy(id2[:], s) - - return id == id2, nil -} - // MarshalJSON returns the JSON encoding of id. func (id ID) MarshalJSON() ([]byte, error) { buf := make([]byte, 2+hex.EncodedLen(len(id))) diff --git a/internal/restic/id_test.go b/internal/restic/id_test.go index ff1dc54e0..9a9fddcda 100644 --- a/internal/restic/id_test.go +++ b/internal/restic/id_test.go @@ -30,14 +30,6 @@ func TestID(t *testing.T) { t.Errorf("ID.Equal() does not work as expected") } - ret, err := id.EqualString(test.id) - if err != nil { - t.Error(err) - } - if !ret { - t.Error("ID.EqualString() returned wrong value") - } - // test json marshalling buf, err := id.MarshalJSON() if err != nil {