Skip to content

Commit b2024d0

Browse files
lberkicopybara-github
authored andcommitted
Add a toString() method to Feature.
A minor quality of life improvement. RELNOTES: None. PiperOrigin-RevId: 882657244 Change-Id: I0c133727b9f4400a315bcd4e018a2fc5d8513cb2
1 parent 956726a commit b2024d0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/main/java/com/google/devtools/build/lib/rules/cpp/CcToolchainFeatures.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import com.github.benmanes.caffeine.cache.LoadingCache;
2222
import com.google.common.annotations.VisibleForTesting;
2323
import com.google.common.base.Joiner;
24+
import com.google.common.base.MoreObjects;
2425
import com.google.common.base.Preconditions;
2526
import com.google.common.base.Throwables;
2627
import com.google.common.collect.ImmutableList;
@@ -740,6 +741,11 @@ public String getName() {
740741
return name;
741742
}
742743

744+
@Override
745+
public String toString() {
746+
return MoreObjects.toStringHelper(this).add("name", name).add("enabled", enabled).toString();
747+
}
748+
743749
/** Adds environment variables for the given action to the provided builder. */
744750
private void expandEnvironment(
745751
String action,

0 commit comments

Comments
 (0)