@@ -125,7 +125,7 @@ impl Generics {
125
125
#[ allow( clippy:: enum_variant_names) ]
126
126
enum Generic {
127
127
Lifetime ( Lifetime ) ,
128
- Generic ( SimpleGeneric ) ,
128
+ Simple ( SimpleGeneric ) ,
129
129
Const ( ConstGeneric ) ,
130
130
}
131
131
@@ -137,7 +137,7 @@ impl Generic {
137
137
fn ident ( & self ) -> Ident {
138
138
match self {
139
139
Self :: Lifetime ( lt) => lt. ident . clone ( ) ,
140
- Self :: Generic ( gen) => gen. ident . clone ( ) ,
140
+ Self :: Simple ( gen) => gen. ident . clone ( ) ,
141
141
Self :: Const ( gen) => gen. ident . clone ( ) ,
142
142
}
143
143
}
@@ -152,23 +152,23 @@ impl Generic {
152
152
fn has_constraints ( & self ) -> bool {
153
153
match self {
154
154
Self :: Lifetime ( lt) => !lt. constraint . is_empty ( ) ,
155
- Self :: Generic ( gen) => !gen. constraints . is_empty ( ) ,
155
+ Self :: Simple ( gen) => !gen. constraints . is_empty ( ) ,
156
156
Self :: Const ( _) => true , // const generics always have a constraint
157
157
}
158
158
}
159
159
160
160
fn constraints ( & self ) -> Vec < TokenTree > {
161
161
match self {
162
162
Self :: Lifetime ( lt) => lt. constraint . clone ( ) ,
163
- Self :: Generic ( gen) => gen. constraints . clone ( ) ,
163
+ Self :: Simple ( gen) => gen. constraints . clone ( ) ,
164
164
Self :: Const ( gen) => gen. constraints . clone ( ) ,
165
165
}
166
166
}
167
167
168
168
fn append_to_result_with_constraints ( & self , builder : & mut StreamBuilder ) {
169
169
match self {
170
170
Self :: Lifetime ( lt) => builder. lifetime ( lt. ident . clone ( ) ) ,
171
- Self :: Generic ( gen) => {
171
+ Self :: Simple ( gen) => {
172
172
builder. ident ( gen. ident . clone ( ) ) ;
173
173
}
174
174
Self :: Const ( gen) => {
@@ -191,7 +191,7 @@ impl From<Lifetime> for Generic {
191
191
192
192
impl From < SimpleGeneric > for Generic {
193
193
fn from ( gen : SimpleGeneric ) -> Self {
194
- Self :: Generic ( gen)
194
+ Self :: Simple ( gen)
195
195
}
196
196
}
197
197
0 commit comments