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:
Matthias Seitz 2022-10-11 22:21:29 +02:00 committed by GitHub
parent f295af1f3f
commit 8789bbea22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 1 deletions

View File

@ -33,7 +33,7 @@ impl MockProjectSkeleton {
}
/// Represents a virtual project
#[derive(Serialize, Default)]
#[derive(Serialize)]
pub struct MockProjectGenerator {
/// how to name things
#[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 {
fn from(inner: MockProjectSkeleton) -> Self {
Self { inner, ..Default::default() }