Skip to content

Commit

Permalink
Update the impl_builder_methods macro to let all chain methods in a s…
Browse files Browse the repository at this point in the history
…ingle impl block
  • Loading branch information
night-cruise committed Oct 18, 2023
1 parent eaa811d commit fde7295
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/v1/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ pub struct Usage {
#[macro_export]
macro_rules! impl_builder_methods {
($builder:ident, $($field:ident: $field_type:ty),*) => {
$(
impl $builder {
impl $builder {
$(
pub fn $field(mut self, $field: $field_type) -> Self {
self.$field = Some($field);
self
}
}
)*
)*
}
};
}

0 comments on commit fde7295

Please sign in to comment.