Skip to content

Commit

Permalink
fix: DB ESDK regressions (#630)
Browse files Browse the repository at this point in the history
A few case of bad merges into #591 that CI didn't catch (due to missing test model coverage, already tracked in related issues).
  • Loading branch information
robin-aws authored Oct 10, 2024
1 parent 6cf0a44 commit 4199690
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1080,7 +1080,7 @@ protected RustFile unionConversionModule(final UnionShape unionShape) {
IOUtils.evalTemplate(
"""
$qualifiedRustUnionName:L::$rustUnionMemberName:L(x) =>
crate::r#$dafnyTypesModuleName:L::$dafnyUnionName:L::$dafnyUnionMemberName:L {
crate::r#$dafnyTypesModuleName:L::$dafnyUnionName:L::$unionMemberName:L {
$dafnyUnionMemberName:L: $innerToDafny:L,
},
""",
Expand All @@ -1096,7 +1096,7 @@ protected RustFile unionConversionModule(final UnionShape unionShape) {
.map(memberVariables ->
IOUtils.evalTemplate(
"""
crate::r#$dafnyTypesModuleName:L::$dafnyUnionName:L::$dafnyUnionMemberName:L {
crate::r#$dafnyTypesModuleName:L::$dafnyUnionName:L::$unionMemberName:L {
$dafnyUnionMemberName:L: x @ _,
} => $qualifiedRustUnionName:L::$rustUnionMemberName:L($innerFromDafny:L),
""",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ fn into(self) -> Client {
}

return new RustFile(
Path.of("src", "client.rs"),
rootPathForShape(service).resolve("client.rs"),
TokenTree.of(preamble, postamble)
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1951,7 +1951,7 @@ protected TokenTree toDafny(
final String coercion = isDafnyOption ? "into()" : "Extract()";
yield TokenTree.of(
"""
(match %s {
std::rc::Rc::new(match %s {
Some(s) => crate::_Wrappers_Compile::Option::Some { value: %s },
None => crate::_Wrappers_Compile::Option::None {},
}).%s""".formatted(rustValue, rustToDafny.formatted("s"), coercion)
Expand Down

0 comments on commit 4199690

Please sign in to comment.