Skip to content

Commit 20427af

Browse files
committed
feat(stackable-versioned): Use proper JSONPath syntax
1 parent 8f26e01 commit 20427af

File tree

4 files changed

+19
-22
lines changed

4 files changed

+19
-22
lines changed

crates/stackable-versioned-macros/src/codegen/container/struct/conversion.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ impl Struct {
7474
<#for_module_ident::#spec_struct_ident as #versioned_path::TrackingFrom<_, _>>::tracking_from(
7575
#from_struct_parameter_ident.spec,
7676
&mut status,
77-
"",
77+
"$",
7878
);
7979

8080
// Construct the final object by copying over the metadata, setting the status and

crates/stackable-versioned-macros/tests/snapshots/stackable_versioned_macros__snapshots__pass@conversion_tracking.rs.snap

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/stackable-versioned/src/lib.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,5 @@ pub struct UnknownDesiredApiVersionError {
171171
}
172172

173173
pub fn jthong_path(parent: &str, child: &str) -> String {
174-
match parent.is_empty() {
175-
true => child.to_owned(),
176-
false => format!("{parent}.{child}"),
177-
}
174+
format!("{parent}.{child}")
178175
}

crates/stackable-versioned/tests/snapshots/conversions__pass@persons_to_v1alpha1.json.snap

Lines changed: 13 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)