transform: Simplify
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Wed, 23 Nov 2016 17:42:47 +0000 (18:42 +0100)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Wed, 23 Nov 2016 17:42:47 +0000 (18:42 +0100)
transform/chain.go

index fbcf0eff2582bce6f49c1e9a3eb7596db2141a1d..1e550d34154c23da67cede223921201f4678b887 100644 (file)
@@ -74,10 +74,8 @@ func (c *chain) Apply(w io.Writer, r io.Reader, p []byte) error {
        }
 
        if len(*c) == 0 {
-               if _, err := b1.WriteTo(w); err != nil {
-                       return err
-               }
-               return nil
+               _, err := b1.WriteTo(w)
+               return err
        }
 
        b2 := bp.GetBuffer()