Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support generate BTreeSet/BTreeMap for thrift set/map #289

Merged
merged 1 commit into from
Nov 22, 2024

Conversation

Millione
Copy link
Member

Support generate BTreeMap and BTreeSet by pilota annotations, for which implements PartialEq, Eq, PartialOrd, Ord that makes it able to be used in set/map.

struct B {
    1: required map<i32, list<A>> m(pilota.rust_type = "btree", pilota.rust_wrapper_arc = "true"),
    2: required set<i32> s(pilota.rust_type = "btree"),
    3: required map<list<map<set<i32>, i32>>, set<i32>> m2(pilota.rust_type = "btree"),
}

const map<i32, list<string>> TEST_MAP_LIST = {
    1: ["hello"]
}(pilota.rust_type = "btree")

typedef map<set<i32>, string> TypeA(pilota.rust_type = "btree")

@Millione Millione requested review from a team as code owners November 20, 2024 13:36
@Millione Millione merged commit c9e0f80 into cloudwego:main Nov 22, 2024
8 checks passed
@Millione Millione deleted the btree branch November 22, 2024 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants