Skip to content

Commit

Permalink
impl Default for SizTypesBuilder
Browse files Browse the repository at this point in the history
also includes a minor clippy lint cleanup of an unnecessary reference
  • Loading branch information
chrissimpkins committed Dec 18, 2023
1 parent a44ad46 commit c54a5aa
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/lib/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ pub struct SizTypesBuilder {
builder: TypesBuilder,
}

impl Default for SizTypesBuilder {
fn default() -> Self {
Self::new()
}
}

impl SizTypesBuilder {
pub fn new() -> Self {
Self {
Expand All @@ -27,7 +33,7 @@ impl SizTypesBuilder {
pub fn filter_types(&mut self, types: &Vec<String>) -> Result<Types> {
self.add_type_defaults();
for t in types {
self.builder.select(&t);
self.builder.select(t);
}
Ok(self.builder.build()?)
}
Expand Down

0 comments on commit c54a5aa

Please sign in to comment.