mirror of
https://github.com/mii443/openai-api-rs.git
synced 2025-08-22 15:15:34 +00:00
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…
This commit is contained in:
@ -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
|
||||
}
|
||||
}
|
||||
)*
|
||||
)*
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user