We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Forge
forge 0.2.0 (9b0575e 2022-08-04T00:04:01.463358166Z)
forge test
Linux
In calc.rs#L12, this fix should be applied:
pub fn mean<T>(values: &[T]) -> U256 where T: Into<U256> + Copy, { - values.iter().copied().fold(U256::zero(), |sum, val| sum + val.into()) / values.len(); + let len = values.len(); + if len > 0 { + values.iter().copied().fold(U256::zero(), |sum, val| sum + val.into()) / len + } else { + U256::zero() + } }
The text was updated successfully, but these errors were encountered:
Is it possible to have write permission on side branches, so I could submit Pull Requests?
Sorry, something went wrong.
Not sure what you mean? Anyone can submit a pull request, you just need to fork the repository and push to a branch on the fork
First time submitting an open source PR ahah, thanks!
Rubilmax
Successfully merging a pull request may close this issue.
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (9b0575e 2022-08-04T00:04:01.463358166Z)
What command(s) is the bug in?
forge test
Operating System
Linux
Describe the bug
In calc.rs#L12, this fix should be applied:
The text was updated successfully, but these errors were encountered: