Skip to content

Commit

Permalink
Avoid creating a temporary list in AspectAwareAttributeMapper.getAttr…
Browse files Browse the repository at this point in the history
…ibuteNames.

PiperOrigin-RevId: 509859496
Change-Id: Icf1e5b49b6690cc24597f49b2cc4fb68abea4d21
  • Loading branch information
tjgq authored and copybara-github committed Feb 15, 2023
1 parent 1c03a1a commit c45d6cc
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

package com.google.devtools.build.lib.analysis;

import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Iterables;
import com.google.devtools.build.lib.cmdline.Label;
import com.google.devtools.build.lib.packages.Attribute;
import com.google.devtools.build.lib.packages.AttributeMap;
Expand Down Expand Up @@ -96,10 +96,7 @@ public boolean isConfigurable(String attributeName) {

@Override
public Iterable<String> getAttributeNames() {
return ImmutableList.<String>builder()
.addAll(ruleAttributes.getAttributeNames())
.addAll(aspectAttributes.keySet())
.build();
return Iterables.concat(ruleAttributes.getAttributeNames(), aspectAttributes.keySet());
}

@Override
Expand Down

0 comments on commit c45d6cc

Please sign in to comment.