Simplify token.builtInsByID

This commit is contained in:
Nigel Tao committed 2018-04-15 18:15:56 +10:00
1 parent e2716e4365
commit c9161bafaf
2 files changed
+142 -146

No files matched your search

+1 -1
View File
@@ -72,7 +72,7 @@ func (m *Map) ByName(name string) ID {
func (m *Map) ByID(x ID) string {
if x < nBuiltInIDs {
return builtInsByID[x].name
return builtInsByID[x]
}
x -= nBuiltInIDs
if uint(x) < uint(len(m.byID)) {