summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRandomChars <random@chars.jp>2021-08-01 11:46:02 +0900
committerRandomChars <random@chars.jp>2021-08-01 11:46:02 +0900
commit2e6ace1a4e040f9dc28aaa6807f7008b7aa22d05 (patch)
tree39806c7012a183fea3f9ff22cf06650ba0ebc2e3
parent1969ea399b2e1e74d2fa3d85f2824167515f09b4 (diff)
not append to allocated slice in page image fetchv0.7.1
-rw-r--r--store/page.go7
1 files changed, 2 insertions, 5 deletions
diff --git a/store/page.go b/store/page.go
index 4f11d3f..5cfa437 100644
--- a/store/page.go
+++ b/store/page.go
@@ -129,11 +129,8 @@ func (s *Store) PageImages(variant string, entry int) []Image {
}
images := make([]Image, len(flakes))
- for _, flake := range flakes {
- image := s.ImageSnowflake(flake)
- if image.Snowflake == flake {
- images = append(images, image)
- }
+ for i, flake := range flakes {
+ images[i] = s.ImageSnowflake(flake)
}
return images
}