Skip to content

Conversation

@AlisdairO
Copy link
Contributor

No description provided.

Copy link
Member

Choose a reason for hiding this comment

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

I believe this example is showing how it is known for a fact that gadget_opt, while a weak pointer, is known to have at least one strong pointer floating around. I'm also not sure that map is the best way to handle options, but rather a match with a None case instead. In general map is used to produce Option<U> from Option<T>, but in this case it's being used in a more iterative context.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fair enough! It was suggested on reddit that unwrap should be avoided in general, and that using map was preferable. I'm happy to just close this to be honest.

@AlisdairO AlisdairO closed this Jul 16, 2014
flip1995 pushed a commit to flip1995/rust that referenced this pull request Nov 28, 2025
Fixes rust-lang/rust-clippy#15404

changelog: [`result_large_err`]: Add `large_error_ignored` configuration
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