Merge pull request #1700 from owncloud/preallocate-slices

pre allocate slices
This commit is contained in:
Jörn Friedrich Dreyer
2021-02-23 09:55:52 +01:00
committed by GitHub
7 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -36,7 +36,7 @@ type Resolutions []image.Rectangle
// ParseResolutions creates an instance of Resolutions from resolution strings.
func ParseResolutions(strs []string) (Resolutions, error) {
var rs Resolutions
rs := make(Resolutions, 0, len(strs))
for _, s := range strs {
r, err := ParseResolution(s)
if err != nil {