cosmetics
Test: m --bazel-mode nothing
Bug: b/239044236
Change-Id: Iaffc315c696f2fa19a2525009010d5964cf5a7d1
diff --git a/bp2build/symlink_forest.go b/bp2build/symlink_forest.go
index 7c39a11..63b6e9e 100644
--- a/bp2build/symlink_forest.go
+++ b/bp2build/symlink_forest.go
@@ -202,13 +202,13 @@
}
}
- allEntries := make(map[string]bool)
+ allEntries := make(map[string]struct{})
for n := range srcDirMap {
- allEntries[n] = true
+ allEntries[n] = struct{}{}
}
for n := range buildFilesMap {
- allEntries[n] = true
+ allEntries[n] = struct{}{}
}
err := os.MkdirAll(shared.JoinPath(topdir, forestDir), 0777)
@@ -250,15 +250,8 @@
continue
}
- sDir := false
- bDir := false
- if sExists {
- sDir = isDir(shared.JoinPath(topdir, srcChild), srcChildEntry)
- }
-
- if bExists {
- bDir = isDir(shared.JoinPath(topdir, buildFilesChild), buildFilesChildEntry)
- }
+ sDir := sExists && isDir(shared.JoinPath(topdir, srcChild), srcChildEntry)
+ bDir := bExists && isDir(shared.JoinPath(topdir, buildFilesChild), buildFilesChildEntry)
if !sExists {
if bDir && excludeChild != nil {