From 4a25d55261392e96969c283bf0854166453f5bab Mon Sep 17 00:00:00 2001 From: Jorropo Date: Fri, 6 Oct 2023 21:17:13 +0200 Subject: [PATCH] path: replace ImmutablePath interface with struct Let's not repeat https://github.com/ipfs/go-block-format/issues/45 interface for struct with one implementation and no value added. This commit was moved from ipfs/boxo@45c797e0ccea0a3186795e64d9e5ed60b5d7544c --- core/coreiface/coreiface/tests/unixfs.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/coreiface/coreiface/tests/unixfs.go b/core/coreiface/coreiface/tests/unixfs.go index e0c37fce4b2c..31ac1b5c9f42 100644 --- a/core/coreiface/coreiface/tests/unixfs.go +++ b/core/coreiface/coreiface/tests/unixfs.go @@ -408,7 +408,7 @@ func (tp *TestSuite) TestAdd(t *testing.T) { t.Errorf("Event.Name didn't match, %s != %s", expected[0].Name, event.Name) } - if expected[0].Path != nil && event.Path != nil { + if (expected[0].Path != path.ImmutablePath{} && event.Path != path.ImmutablePath{}) { if expected[0].Path.RootCid().String() != event.Path.RootCid().String() { t.Errorf("Event.Hash didn't match, %s != %s", expected[0].Path, event.Path) }