internal/restorable: refactoring

This commit is contained in:
Hajime Hoshi 2024-09-08 16:03:56 +09:00
parent d84b030300
commit 167c3435f7

View File

@ -242,10 +242,8 @@ func (i *images) restore(graphicsDriver graphicsdriver.Graphics) error {
current[i] = struct{}{} current[i] = struct{}{}
} }
for e := range edges { for e := range edges {
if _, ok := current[e.target]; ok {
delete(current, e.target) delete(current, e.target)
} }
}
for i := range current { for i := range current {
delete(images, i) delete(images, i)
sorted = append(sorted, i) sorted = append(sorted, i)