Skip to content

Commit

Permalink
Fix calculation of max value in Struct
Browse files Browse the repository at this point in the history
  • Loading branch information
jackdotink committed Jan 21, 2024
1 parent eadf229 commit 93162ae
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions zap/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -298,9 +298,7 @@ impl<'src> Struct<'src> {

if let Some(ty_max) = ty_max {
if let Some(current_max) = max {
if ty_max > current_max {
max = Some(ty_max);
}
max = Some(ty_max + current_max);
}
} else {
max = None;
Expand Down

0 comments on commit 93162ae

Please sign in to comment.