all: apply suggestions from staticcheck.io

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2022-06-03 12:22:52 +02:00
committed by Elias Naur
parent 11192a5142
commit 916efb4612
13 changed files with 7 additions and 219 deletions
-21
View File
@@ -128,27 +128,6 @@ func (l Layout) Slice(start, end int) Layout {
return out
}
// equals returns true when l2 is logically equivalent to l.
func (l Layout) equals(l2 Layout) bool {
if len(l.Glyphs) != len(l2.Glyphs) || len(l.Clusters) != len(l2.Clusters) {
return false
}
if l.Runes != l2.Runes || l.Direction != l2.Direction {
return false
}
for i := range l.Clusters {
if l.Clusters[i] != l2.Clusters[i] {
return false
}
}
for i := range l.Glyphs {
if l.Glyphs[i] != l2.Glyphs[i] {
return false
}
}
return true
}
// Style is the font style.
type Style int