fix: impl default manually for mock project (#1779)
* fix: impl default manually for mock project * chore: silence impossible to derive default lint Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
This commit is contained in:
parent
f295af1f3f
commit
8789bbea22
|
@ -33,7 +33,7 @@ impl MockProjectSkeleton {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Represents a virtual project
|
/// Represents a virtual project
|
||||||
#[derive(Serialize, Default)]
|
#[derive(Serialize)]
|
||||||
pub struct MockProjectGenerator {
|
pub struct MockProjectGenerator {
|
||||||
/// how to name things
|
/// how to name things
|
||||||
#[serde(skip)]
|
#[serde(skip)]
|
||||||
|
@ -362,6 +362,13 @@ impl MockProjectGenerator {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(clippy::derivable_impls)]
|
||||||
|
impl Default for MockProjectGenerator {
|
||||||
|
fn default() -> Self {
|
||||||
|
Self { name_strategy: Box::<SimpleNamingStrategy>::default(), inner: Default::default() }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl From<MockProjectSkeleton> for MockProjectGenerator {
|
impl From<MockProjectSkeleton> for MockProjectGenerator {
|
||||||
fn from(inner: MockProjectSkeleton) -> Self {
|
fn from(inner: MockProjectSkeleton) -> Self {
|
||||||
Self { inner, ..Default::default() }
|
Self { inner, ..Default::default() }
|
||||||
|
|
Loading…
Reference in New Issue