Skip to content

How to convert a .ok() match call to a pure match call when returning to a PyResult? #3486

Answered by birkenfeld
nth10sd asked this question in Questions
Discussion options

You must be logged in to vote

.ok() does not introduce a panic. It merely converts a Err(e) which carries more information about the error into None, which just carries the information "it didn't work".

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by nth10sd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants