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@45c797e0cc
This commit is contained in:
Jorropo 2023-10-06 21:17:13 +02:00 committed by Henrique Dias
parent 5bac37c735
commit dafdce8983

View File

@ -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)
}