diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f475fd44..c9f8b6816 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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)) diff --git a/glean_parser/rust.py b/glean_parser/rust.py index 6dd4426d8..d9bd43cc0 100644 --- a/glean_parser/rust.py +++ b/glean_parser/rust.py @@ -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 diff --git a/tests/test_rust.py b/tests/test_rust.py index 126868f38..d6b2becca 100644 --- a/tests/test_rust.py +++ b/tests/test_rust.py @@ -132,7 +132,7 @@ def test_metric_type_name(): expires="never", ) - assert rust.type_name(event) == "EventMetric" + assert rust.type_name(event) == "EventMetric" boolean = metrics.Boolean( type="boolean",