Skip to content

Commit 0c9ad69

Browse files
author
Dongri Jin
authored
Merge pull request #38 from night-cruise/fix/update-impl-builder-methods
Update the impl_builder_methods macro to let all chain methods in a s…
2 parents eaa811d + fde7295 commit 0c9ad69

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/v1/common.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ pub struct Usage {
1010
#[macro_export]
1111
macro_rules! impl_builder_methods {
1212
($builder:ident, $($field:ident: $field_type:ty),*) => {
13-
$(
14-
impl $builder {
13+
impl $builder {
14+
$(
1515
pub fn $field(mut self, $field: $field_type) -> Self {
1616
self.$field = Some($field);
1717
self
1818
}
19-
}
20-
)*
19+
)*
20+
}
2121
};
2222
}

0 commit comments

Comments
 (0)