Remove unused GlobalKey.packageId accessor (#19400)

This commit is contained in:
Simon Maxen 2024-06-20 10:11:27 +01:00 committed by GitHub
parent e2f447333d
commit 19d2d6b17e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 3 deletions

View File

@ -359,8 +359,8 @@ final class Conversions(
def convertGlobalKey(globalKey: GlobalKey): proto.GlobalKey = {
val builder = proto.GlobalKey.newBuilder
globalKey.packageId.foreach(p => builder.setPackage(convertPackageId(p)))
builder
.setPackage(convertPackageId(globalKey.templateId.packageId))
.setName(globalKey.qualifiedName.toString)
.setKey(convertValue(globalKey.key))
.build

View File

@ -23,8 +23,6 @@ final class GlobalKey private (
case _ => false
}
// Ready for refactoring where packageId becomes optional (#14486)
def packageId: Option[Ref.PackageId] = Some(templateId.packageId)
def qualifiedName: Ref.QualifiedName = templateId.qualifiedName
override def hashCode(): Int = hash.hashCode()