Skip to content

Commit 7784863

Browse files
committed
Moved list cleanup into unescapeAndSplit
1 parent e1bd351 commit 7784863

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/arduino/builder/cpp/depfile.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@ func readDepFile(depFile string) (*Dependencies, error) {
5959
if err != nil {
6060
return nil, err
6161
}
62-
rows = f.Map(rows, strings.TrimSpace)
63-
rows = f.Filter(rows, f.NotEquals(""))
6462
if len(rows) == 0 {
6563
return &Dependencies{}, nil
6664
}
@@ -135,5 +133,7 @@ func unescapeAndSplit(s string) ([]string, error) {
135133
if current.Len() > 0 {
136134
res = append(res, current.String())
137135
}
136+
res = f.Map(res, strings.TrimSpace)
137+
res = f.Filter(res, f.NotEquals(""))
138138
return res, nil
139139
}

0 commit comments

Comments
 (0)