-
Notifications
You must be signed in to change notification settings - Fork 613
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: thrift like ``` typdef map<string, i64> map_t (rust.type="sorted_vector_map::SortedVectorMap") struct T { 1: map_t data; } ``` should generate rust like, ``` pub map_t = ::std::collections::BTreeMap<String, i64>; pub struct T { pub data: sorted_vector_map::SortedVectorMap<String, i64>, } impl<P> fbthrift::Serialize<P> for LocalImpl<sorted_vector_map::SortedVectorMap< ::std::string::String, ::std::primitive::i64>> { ...} impl<P> fbthrift::Deserialize<P> for LocalImpl<sorted_vector_map::SortedVectorMap< ::std::string::String, ::std::primitive::i64>> { ...} ``` but until now this has not been the case [^1]. this diff fixes that. [^1]: substitution of `SortedVectorMap<...>` for `crate::types::map_t` in the definition of `T` has been lacking. Reviewed By: zertosh Differential Revision: D51478881 fbshipit-source-id: 9bcd1d6a25a9b433d2136fb84aaa56d410074b57
- Loading branch information
1 parent
e95097a
commit 8fd5297
Showing
7 changed files
with
88 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
thrift/compiler/test/fixtures/rust-newtype-typedef/gen-rust/types.rs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters