Skip to content

Commit

Permalink
Rust codegen: use correctly named parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
badboy committed Aug 30, 2024
1 parent 5ce0f97 commit 265613d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased

- Rust codegen: use correctly named parameter for events without extras ([#750](https://github.com/mozilla/glean_parser/pull/750))

## 15.0.0

- **Breaking change:** Updating Kotlin template import statement as part of removing `service-glean` from Android Components. ([bug 1906941](https://bugzilla.mozilla.org/show_bug.cgi?id=1906941))
Expand Down
2 changes: 1 addition & 1 deletion glean_parser/rust.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def type_name(obj):
generic = util.Camelize(obj.name) + suffix
else:
if isinstance(obj, metrics.Event):
generic = "NoExtra"
generic = "NoExtraKeys"
else:
generic = "No" + suffix

Expand Down
2 changes: 1 addition & 1 deletion tests/test_rust.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def test_metric_type_name():
expires="never",
)

assert rust.type_name(event) == "EventMetric<NoExtra>"
assert rust.type_name(event) == "EventMetric<NoExtraKeys>"

boolean = metrics.Boolean(
type="boolean",
Expand Down

0 comments on commit 265613d

Please sign in to comment.