pass render filters and maps by value rather than reference

They are small and don't carry mutable state, so there is no point
passing them by reference.
This commit is contained in:
Matthias Radestock
2017-11-18 12:10:00 +00:00
parent a375891a4d
commit aaf4e54df2
2 changed files with 6 additions and 6 deletions

View File

@@ -70,12 +70,12 @@ type Map struct {
// MakeMap makes a new Map
func MakeMap(f MapFunc, r Renderer) Renderer {
return &Map{f, r}
return Map{f, r}
}
// Render transforms a set of Nodes produces by another Renderer.
// using a map function
func (m *Map) Render(rpt report.Report, dct Decorator) Nodes {
func (m Map) Render(rpt report.Report, dct Decorator) Nodes {
var (
input = m.Renderer.Render(rpt, dct)
output = report.Nodes{}