Skip to content

Commit

Permalink
use Default::default rather than buidler::#type_name::Default to avoi…
Browse files Browse the repository at this point in the history
…d conflicts (#458)
  • Loading branch information
ahl committed Dec 15, 2023
1 parent 048828b commit cafdeeb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions cargo-typify/tests/outputs/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ impl From<&Veggie> for Veggie {
}
impl Veggie {
pub fn builder() -> builder::Veggie {
builder::Veggie::default()
Default::default()
}
}
#[doc = "A representation of a person, company, organization, or place"]
Expand All @@ -114,7 +114,7 @@ impl From<&Veggies> for Veggies {
}
impl Veggies {
pub fn builder() -> builder::Veggies {
builder::Veggies::default()
Default::default()
}
}
pub mod builder {
Expand Down
2 changes: 1 addition & 1 deletion typify-impl/src/type_entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1109,7 +1109,7 @@ impl TypeEntry {
quote! {
impl #type_name {
pub fn builder() -> builder::#type_name {
builder::#type_name::default()
Default::default()
}
}
},
Expand Down
6 changes: 3 additions & 3 deletions typify-impl/tests/generator.out
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ mod types {
}
impl AllTheTraits {
pub fn builder() -> builder::AllTheTraits {
builder::AllTheTraits::default()
Default::default()
}
}
#[doc = "CompoundType"]
Expand All @@ -43,7 +43,7 @@ mod types {
}
impl CompoundType {
pub fn builder() -> builder::CompoundType {
builder::CompoundType::default()
Default::default()
}
}
#[doc = "Pair"]
Expand All @@ -68,7 +68,7 @@ mod types {
}
impl Pair {
pub fn builder() -> builder::Pair {
builder::Pair::default()
Default::default()
}
}
#[doc = "StringEnum"]
Expand Down

0 comments on commit cafdeeb

Please sign in to comment.