Skip to content

Commit 28a1f00

Browse files
committed
Remove unused TypeInfo.Identifier()
atree.TypeInfo interface used to include Identifier() function. However, Identifier() was removed later and is no longer part of atree.TypeInfo interface. This commit removes Identifier() function from structs implementing atree.TypeInfo interface.
1 parent a56e521 commit 28a1f00

File tree

2 files changed

+0
-20
lines changed

2 files changed

+0
-20
lines changed

interpreter/encode.go

-8
Original file line numberDiff line numberDiff line change
@@ -1684,10 +1684,6 @@ func (c compositeTypeInfo) IsComposite() bool {
16841684
return true
16851685
}
16861686

1687-
func (c compositeTypeInfo) Identifier() string {
1688-
return string(c.location.TypeID(nil, c.qualifiedIdentifier))
1689-
}
1690-
16911687
func (c compositeTypeInfo) Copy() atree.TypeInfo {
16921688
// Return c as is because c is a value type.
16931689
return c
@@ -1741,10 +1737,6 @@ func (e EmptyTypeInfo) IsComposite() bool {
17411737
return false
17421738
}
17431739

1744-
func (e EmptyTypeInfo) Identifier() string {
1745-
return ""
1746-
}
1747-
17481740
func (e EmptyTypeInfo) Copy() atree.TypeInfo {
17491741
return e
17501742
}

interpreter/statictype.go

-12
Original file line numberDiff line numberDiff line change
@@ -252,10 +252,6 @@ func (t *VariableSizedStaticType) Copy() atree.TypeInfo {
252252
return t
253253
}
254254

255-
func (t *VariableSizedStaticType) Identifier() string {
256-
return string(t.ID())
257-
}
258-
259255
func (*VariableSizedStaticType) isStaticType() {}
260256

261257
func (*VariableSizedStaticType) elementSize() uint {
@@ -382,10 +378,6 @@ func (t *ConstantSizedStaticType) Copy() atree.TypeInfo {
382378
return t
383379
}
384380

385-
func (t *ConstantSizedStaticType) Identifier() string {
386-
return string(t.ID())
387-
}
388-
389381
func (*ConstantSizedStaticType) isStaticType() {}
390382

391383
func (*ConstantSizedStaticType) elementSize() uint {
@@ -464,10 +456,6 @@ func (t *DictionaryStaticType) Copy() atree.TypeInfo {
464456
return t
465457
}
466458

467-
func (t *DictionaryStaticType) Identifier() string {
468-
return string(t.ID())
469-
}
470-
471459
func (*DictionaryStaticType) isStaticType() {}
472460

473461
func (*DictionaryStaticType) elementSize() uint {

0 commit comments

Comments
 (0)