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
panic!
ゼロ除算の可能性がある場合、panic!を使用するのは適切ではありません。代わりにエラーを返すか、オプション型を使用することで、より安全な実装にすることができます。
- _ => panic!("Cannot divide different types or divide by zero"), + _ => return Err("Cannot divide different types or divide by zero"),
この変更により、Divトレイトの実装の戻り値の型もResult<Self, &'static str>に変更する必要があります。
Div
Result<Self, &'static str>
Originally posted by @github-actions[bot] in #9 (comment)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
ゼロ除算の可能性がある場合、
panic!
を使用するのは適切ではありません。代わりにエラーを返すか、オプション型を使用することで、より安全な実装にすることができます。この変更により、
Div
トレイトの実装の戻り値の型もResult<Self, &'static str>
に変更する必要があります。Originally posted by @github-actions[bot] in #9 (comment)
The text was updated successfully, but these errors were encountered: