Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Muehlhaeuser <muesli@gmail.com>2019-08-02 18:20:36 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-08-10 02:04:43 +0300
commite88d7989907108b656eccd92bccc076be72a5c03 (patch)
tree7a739f8d3debf252f1c804d08fe98965c95d0b5f /resources
parentc0eef3b401615e85bb74baee6a515abcf531fc2c (diff)
Fixed tautological error conditions
Drop error & nil checks where the value can not have changed.
Diffstat (limited to 'resources')
-rw-r--r--resources/smartcrop.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/resources/smartcrop.go b/resources/smartcrop.go
index 05bc55cd7..d28a8dd03 100644
--- a/resources/smartcrop.go
+++ b/resources/smartcrop.go
@@ -70,10 +70,7 @@ func smartCrop(img image.Image, width, height int, anchor imaging.Anchor, filter
b := img.Bounds().Intersect(rect)
- cropped, err := imaging.Crop(img, b), nil
- if err != nil {
- return nil, err
- }
+ cropped := imaging.Crop(img, b)
return imaging.Resize(cropped, width, height, filter), nil