| commit | ce879342b921ce733afd39a146f35cdc1f19fa54 | [log] [tgz] |
|---|---|---|
| author | Anmol Sethi <anmol@aubble.com> | Sat Jul 09 07:09:56 2016 -0400 |
| committer | Anmol Sethi <anmol@aubble.com> | Sat Jul 09 07:11:16 2016 -0400 |
| tree | 8284d885839f9c35bd0c449a6c55581ff1589212 | |
| parent | 3f231c5d5140eeeac8f42e4cf8cb84e5304a964d [diff] |
avoid unnecessary allocation with New() in Append()
diff --git a/chain.go b/chain.go index 58a7a51..da0e2b5 100644 --- a/chain.go +++ b/chain.go
@@ -83,7 +83,7 @@ newCons = append(newCons, c.constructors...) newCons = append(newCons, constructors...) - return New(newCons...) + return Chain{newCons} } // Extend extends a chain by adding the specified chain