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
Jorropo committed
Oct 6, 2023 at 21:17 UTC
dafdce89838f358180a52a5bfbb4b198be25b8da
1 file changed
+1
-1
core/coreiface/tests/unixfs.go
+1
-1
@@ -408,7 +408,7 @@ func (tp *TestSuite) TestAdd(t *testing.T) {
408
t.Errorf("Event.Name didn't match, %s != %s", expected[0].Name, event.Name)
409
}
410
411
- if expected[0].Path != nil && event.Path != nil {
411
+ if (expected[0].Path != path.ImmutablePath{} && event.Path != path.ImmutablePath{}) {
412
if expected[0].Path.RootCid().String() != event.Path.RootCid().String() {
413
t.Errorf("Event.Hash didn't match, %s != %s", expected[0].Path, event.Path)
414
}