Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Remmirad committed Jan 29, 2025
1 parent 006e35d commit 35003db
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ impl NumericError {
Some(n) => n,
_ => panic!("Error names are expected to be positive for conversion into negative error numbers.")
};
NumericError { number }
NumericError {
number: number.saturating_neg(),
}
}

/// Numeric value of the error
Expand Down

0 comments on commit 35003db

Please sign in to comment.