Skip to content
New issue

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

[Burn-train] Improve panic messages #885

Merged
merged 2 commits into from
Oct 23, 2023
Merged

Conversation

nathanielsimard
Copy link
Member

@nathanielsimard nathanielsimard commented Oct 23, 2023

Replace a lot of unwrap with expect or unwrap_or_else.

Copy link
Member

@louisfd louisfd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's good. Weird to see positive error message but it appears to be the idiomatic way: https://doc.rust-lang.org/std/result/enum.Result.html#recommended-message-style

if self
.deleted
.get(i)
.expect("Ad many 'deleted' as 'strategies'.")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As

@louisfd louisfd merged commit 80fe58c into main Oct 23, 2023
7 checks passed
@nathanielsimard nathanielsimard deleted the feat/improve-panic-messages branch October 23, 2023 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants