File tree Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -49,20 +49,29 @@ impl<'a> Context<'a> {
49
49
50
50
/// Returns an iterator over the additional attributes configured
51
51
/// for the named type.
52
- pub fn type_attributes ( & self , fq_type_name : & str ) -> path:: Iter < ' _ , String > {
53
- self . config . type_attributes . get ( fq_type_name)
52
+ pub fn type_attributes ( & self , fq_type_name : & str ) -> impl Iterator < Item = & str > {
53
+ self . config
54
+ . type_attributes
55
+ . get ( fq_type_name)
56
+ . map ( |s| s. as_str ( ) )
54
57
}
55
58
56
59
/// Returns an iterator over the additional attributes configured
57
60
/// for the named message.
58
- pub fn message_attributes ( & self , fq_message_name : & str ) -> path:: Iter < ' _ , String > {
59
- self . config . message_attributes . get ( fq_message_name)
61
+ pub fn message_attributes ( & self , fq_message_name : & str ) -> impl Iterator < Item = & str > {
62
+ self . config
63
+ . message_attributes
64
+ . get ( fq_message_name)
65
+ . map ( |s| s. as_str ( ) )
60
66
}
61
67
62
68
/// Returns an iterator over the additional attributes configured
63
69
/// for the named enum.
64
- pub fn enum_attributes ( & self , fq_enum_name : & str ) -> path:: Iter < ' _ , String > {
65
- self . config . enum_attributes . get ( fq_enum_name)
70
+ pub fn enum_attributes ( & self , fq_enum_name : & str ) -> impl Iterator < Item = & str > {
71
+ self . config
72
+ . enum_attributes
73
+ . get ( fq_enum_name)
74
+ . map ( |s| s. as_str ( ) )
66
75
}
67
76
68
77
/// Returns an iterator over the additional attributes configured
You can’t perform that action at this time.
0 commit comments