Skip to content

Commit e1958b3

Browse files
authored
fix(volo-build): return type should wrapper arc (#593)
Change-Id: Id9304bb0fb4d289487d765b4a17ae5dc18a526a3
1 parent a4bc5c1 commit e1958b3

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

Cargo.lock

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

volo-build/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "volo-build"
3-
version = "0.11.0"
3+
version = "0.11.1"
44
edition.workspace = true
55
homepage.workspace = true
66
repository.workspace = true

volo-build/src/thrift_backend.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,9 @@ impl pilota_build::CodegenBackend for VoloThriftBackend {
512512
}).join("");
513513

514514
let mut resp_type_str = format!("{resp_type}");
515+
if let Some(RustWrapperArc(true)) = self.cx().tags(m.ret.tags_id).as_ref().and_then(|tags| tags.get::<RustWrapperArc>()) {
516+
resp_type_str = format!("::std::sync::Arc<{resp_type_str}>");
517+
}
515518
let mut resp_str = "::std::result::Result::Ok(resp)";
516519
if !convert_exceptions.is_empty() {
517520
resp_type_str = format!("::volo_thrift::MaybeException<{resp_type_str}, {exception}>");

0 commit comments

Comments
 (0)