File tree Expand file tree Collapse file tree 4 files changed +10
-2
lines changed Expand file tree Collapse file tree 4 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -685,7 +685,6 @@ impl Config {
685
685
S : AsRef < str > ,
686
686
D : AsRef < str > ,
687
687
{
688
- self . type_name_domains . clear ( ) ;
689
688
for matcher in paths {
690
689
self . type_name_domains
691
690
. insert ( matcher. as_ref ( ) . to_string ( ) , domain. as_ref ( ) . to_string ( ) ) ;
Original file line number Diff line number Diff line change @@ -165,6 +165,7 @@ fn main() {
165
165
prost_build:: Config :: new ( )
166
166
. enable_type_names ( )
167
167
. type_name_domain ( [ ".type_names.Foo" ] , "tests" )
168
+ . type_name_domain ( [ ".type_names.Qux" ] , "tests-cumulative" )
168
169
. compile_protos ( & [ src. join ( "type_names.proto" ) ] , includes)
169
170
. unwrap ( ) ;
170
171
Original file line number Diff line number Diff line change @@ -8,4 +8,7 @@ message Foo {
8
8
}
9
9
10
10
message Baz {
11
- }
11
+ }
12
+
13
+ message Qux {
14
+ }
Original file line number Diff line number Diff line change @@ -18,4 +18,9 @@ fn valid_type_names() {
18
18
assert_eq ! ( "type_names" , Baz :: PACKAGE ) ;
19
19
assert_eq ! ( "type_names.Baz" , Baz :: full_name( ) ) ;
20
20
assert_eq ! ( "/type_names.Baz" , Baz :: type_url( ) ) ;
21
+
22
+ assert_eq ! ( "Qux" , Qux :: NAME ) ;
23
+ assert_eq ! ( "type_names" , Qux :: PACKAGE ) ;
24
+ assert_eq ! ( "type_names.Qux" , Qux :: full_name( ) ) ;
25
+ assert_eq ! ( "tests-cumulative/type_names.Qux" , Qux :: type_url( ) ) ;
21
26
}
You can’t perform that action at this time.
0 commit comments