Skip to content

Commit 9fccb50

Browse files
committed
Removed useless cloning of buildProperties
1 parent 60d5bf5 commit 9fccb50

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

internal/arduino/builder/recipe.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,18 @@ import (
2727

2828
// RunRecipe fixdoc
2929
func (b *Builder) RunRecipe(prefix, suffix string, skipIfOnlyUpdatingCompilationDatabase bool) error {
30-
// TODO is it necessary to use Clone?
31-
return b.RunRecipeWithProps(prefix, suffix, b.buildProperties.Clone(), skipIfOnlyUpdatingCompilationDatabase)
30+
return b.RunRecipeWithProps(prefix, suffix, b.buildProperties, skipIfOnlyUpdatingCompilationDatabase)
3231
}
3332

3433
func (b *Builder) RunRecipeWithProps(prefix, suffix string, buildProperties *properties.Map, skipIfOnlyUpdatingCompilationDatabase bool) error {
3534
logrus.Debugf("Looking for recipes like %s", prefix+"*"+suffix)
3635

3736
recipes := findRecipes(buildProperties, prefix, suffix)
3837

39-
// TODO is it necessary to use Clone?
40-
properties := buildProperties.Clone()
4138
for _, recipe := range recipes {
4239
logrus.Debugf("Running recipe: %s", recipe)
4340

44-
command, err := b.prepareCommandForRecipe(properties, recipe, false)
41+
command, err := b.prepareCommandForRecipe(buildProperties, recipe, false)
4542
if err != nil {
4643
return err
4744
}

0 commit comments

Comments
 (0)