feat: Better progress reporting for stage checkpoints (#2982)

Co-authored-by: Alexey Shekhirin <a.shekhirin@gmail.com>
This commit is contained in:
Georgios Konstantopoulos
2023-06-05 09:10:46 -07:00
committed by GitHub
parent 6fab79bbc2
commit 08900740bc
28 changed files with 1601 additions and 341 deletions

View File

@ -119,7 +119,13 @@ impl<'a> StructHandler<'a> {
assert!(
known_types.contains(&ftype.as_str()) ||
is_flag_type(ftype) ||
self.fields_iterator.peek().is_none(),
self.fields_iterator.peek().map_or(true, |ftypes| {
if let FieldTypes::StructField((_, ftype, _, _)) = ftypes {
!known_types.contains(&ftype.as_str())
} else {
false
}
}),
"`{ftype}` field should be placed as the last one since it's not known.
If it's an alias type (which are not supported by proc_macro), be sure to add it to either `known_types` or `get_bit_size` lists in the derive crate."
);