Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Improve error handling#4

Merged
LukeMathWalker merged 4 commits intoLukeMathWalker:histogram-error-handlingLukeMathWalker/ndarray-stats:histogram-error-handlingfrom
rust-ndarray:histogram-error-handlingrust-ndarray/ndarray-stats:histogram-error-handlingCopy head branch name to clipboard
Apr 1, 2019
Merged

Improve error handling#4
LukeMathWalker merged 4 commits intoLukeMathWalker:histogram-error-handlingLukeMathWalker/ndarray-stats:histogram-error-handlingfrom
rust-ndarray:histogram-error-handlingrust-ndarray/ndarray-stats:histogram-error-handlingCopy head branch name to clipboard

Conversation

@jturner314
Copy link

This is nice because it doesn't lose information. (Returning an
`Option` combines the two error variants into a single case.)
Once the `#[non_exhaustive]` attribute is stable, we should replace
the hidden enum variant with that attribute on the enum.
@jturner314 jturner314 force-pushed the histogram-error-handling branch from fafbfc5 to f41b317 Compare April 1, 2019 01:36
}
_ => Ok(None),
}
let min = a.min()?;
Copy link
Owner

Choose a reason for hiding this comment

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

This looks way cleaner now, it's nice!

@LukeMathWalker LukeMathWalker merged commit 308e0e7 into LukeMathWalker:histogram-error-handling Apr 1, 2019
@LukeMathWalker LukeMathWalker deleted the histogram-error-handling branch April 1, 2019 07:40
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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.