Skip to content

Commit

Permalink
using pural for names
Browse files Browse the repository at this point in the history
  • Loading branch information
Cheukting committed Jul 13, 2024
1 parent bce031d commit 50ec829
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pyo3-macros-backend/src/attributes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,11 @@ pub fn take_pyo3_options<T: Parse>(attrs: &mut Vec<syn::Attribute>) -> Result<Ve
}
}
Err(err) => {
all_error.combine(err);
all_errors.combine(err);
Ok(true)
}
})?;
all_error.ensure_empty()?;
all_errors.ensure_empty()?;
Ok(out)
}

Expand Down
6 changes: 3 additions & 3 deletions pyo3-macros-backend/src/pyclass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,20 +262,20 @@ pub fn build_py_class(

// handle error here

let mut all_error = ErrorCombiner(None);
let mut all_errors = ErrorCombiner(None);

let mut field_options: Vec<(&syn::Field, FieldPyO3Options)> = field_options_res
.drain(..)
.filter_map(|result| match result {
Err(err) => {
all_error.combine(err);
all_errors.combine(err);
None
}
Ok(options) => Some(options),
})
.collect::<Vec<_>>();

all_error.ensure_empty()?;
all_errors.ensure_empty()?;

if let Some(attr) = args.options.get_all {
for (_, FieldPyO3Options { get, .. }) in &mut field_options {
Expand Down

0 comments on commit 50ec829

Please sign in to comment.