Skip to content

Commit 7d1aeec

Browse files
committed
use escale_label_str in escape_label
to avoid duplication of implementation
1 parent 7c88466 commit 7d1aeec

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

zig/private/common/escape_label.bzl

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,7 @@ def escape_label(*, label):
1515
path = label.package + ":" + label.name
1616
if label.repo_name:
1717
path = label.repo_name + "@" + path
18-
result = []
19-
for idx in range(len(path)):
20-
c = path[idx]
21-
result.append(_PATH_ESCAPE_REPLACEMENTS.get(
22-
c,
23-
c, # no escaping by default
24-
))
25-
return "".join(result)
18+
return escape_label_str(path)
2619

2720
# buildifier: disable=function-docstring
2821
def escape_label_str(label_str):

0 commit comments

Comments
 (0)