@@ -174,15 +174,15 @@ pub struct TomlPackage {
174
174
/// An enum that allows for inheriting keys from a workspace in a Cargo.toml.
175
175
#[ derive( Serialize , Copy , Clone , Debug ) ]
176
176
#[ serde( untagged) ]
177
- pub enum InheritableField < T , W > {
177
+ pub enum InheritableField < T > {
178
178
/// The type that that is used when not inheriting from a workspace.
179
179
Value ( T ) ,
180
180
/// The type when inheriting from a workspace.
181
- Inherit ( W ) ,
181
+ Inherit ( TomlInheritedField ) ,
182
182
}
183
183
184
184
//. This already has a `Deserialize` impl from version_trim_whitespace
185
- pub type InheritableSemverVersion = InheritableField < semver:: Version , TomlInheritedField > ;
185
+ pub type InheritableSemverVersion = InheritableField < semver:: Version > ;
186
186
impl < ' de > de:: Deserialize < ' de > for InheritableSemverVersion {
187
187
fn deserialize < D > ( d : D ) -> Result < Self , D :: Error >
188
188
where
@@ -201,7 +201,7 @@ impl<'de> de::Deserialize<'de> for InheritableSemverVersion {
201
201
}
202
202
}
203
203
204
- pub type InheritableString = InheritableField < String , TomlInheritedField > ;
204
+ pub type InheritableString = InheritableField < String > ;
205
205
impl < ' de > de:: Deserialize < ' de > for InheritableString {
206
206
fn deserialize < D > ( d : D ) -> Result < Self , D :: Error >
207
207
where
@@ -236,7 +236,7 @@ impl<'de> de::Deserialize<'de> for InheritableString {
236
236
}
237
237
}
238
238
239
- pub type InheritableRustVersion = InheritableField < RustVersion , TomlInheritedField > ;
239
+ pub type InheritableRustVersion = InheritableField < RustVersion > ;
240
240
impl < ' de > de:: Deserialize < ' de > for InheritableRustVersion {
241
241
fn deserialize < D > ( d : D ) -> Result < Self , D :: Error >
242
242
where
@@ -272,7 +272,7 @@ impl<'de> de::Deserialize<'de> for InheritableRustVersion {
272
272
}
273
273
}
274
274
275
- pub type InheritableVecString = InheritableField < Vec < String > , TomlInheritedField > ;
275
+ pub type InheritableVecString = InheritableField < Vec < String > > ;
276
276
impl < ' de > de:: Deserialize < ' de > for InheritableVecString {
277
277
fn deserialize < D > ( d : D ) -> Result < Self , D :: Error >
278
278
where
@@ -307,7 +307,7 @@ impl<'de> de::Deserialize<'de> for InheritableVecString {
307
307
}
308
308
}
309
309
310
- pub type InheritableStringOrBool = InheritableField < StringOrBool , TomlInheritedField > ;
310
+ pub type InheritableStringOrBool = InheritableField < StringOrBool > ;
311
311
impl < ' de > de:: Deserialize < ' de > for InheritableStringOrBool {
312
312
fn deserialize < D > ( d : D ) -> Result < Self , D :: Error >
313
313
where
@@ -351,7 +351,7 @@ impl<'de> de::Deserialize<'de> for InheritableStringOrBool {
351
351
}
352
352
}
353
353
354
- pub type InheritableVecStringOrBool = InheritableField < VecStringOrBool , TomlInheritedField > ;
354
+ pub type InheritableVecStringOrBool = InheritableField < VecStringOrBool > ;
355
355
impl < ' de > de:: Deserialize < ' de > for InheritableVecStringOrBool {
356
356
fn deserialize < D > ( d : D ) -> Result < Self , D :: Error >
357
357
where
@@ -395,8 +395,7 @@ impl<'de> de::Deserialize<'de> for InheritableVecStringOrBool {
395
395
}
396
396
}
397
397
398
- pub type InheritableBtreeMap =
399
- InheritableField < BTreeMap < String , BTreeMap < String , String > > , TomlInheritedField > ;
398
+ pub type InheritableBtreeMap = InheritableField < BTreeMap < String , BTreeMap < String , String > > > ;
400
399
401
400
impl < ' de > de:: Deserialize < ' de > for InheritableBtreeMap {
402
401
fn deserialize < D > ( deserializer : D ) -> Result < Self , D :: Error >
0 commit comments