Skip to content

Conversation

@lauti7
Copy link

@lauti7 lauti7 commented Apr 1, 2023

Maybe I'm wrong or misunderstanding something

@jonhoo
Copy link
Owner

jonhoo commented Apr 8, 2023

If I understand you correctly, the thing that confused you here is that it's not clear that the "empty" in the last sentence refers to the same thing as "cheap-to-construct default values", is that right?

@LeoniePhiline
Copy link

LeoniePhiline commented Apr 21, 2023

I also found this section confusing and wished for a clearer separation between discussing

  • Option::take, leaving None and
  • std::mem::take, leaving Default::default

as techniques at hand.

Each with their benefits and downsides, such as requiring tedious boilerplate or operating on unexpectedly empty collections.

Furthermore, the section speaks about “options” one has, while also discussing Options. This could be rephrased as “possibilities”, “approaches” or “techniques”.

@lauti7
Copy link
Author

lauti7 commented Apr 29, 2023

If I understand you correctly, the thing that confused you here is that it's not clear that the "empty" in the last sentence refers to the same thing as "cheap-to-construct default values", is that right?

Yep, maybe it's that or the way that it's mixing the std::mem::take with Option::take. I think that @LeoniePhiline is also good!

Copy link
Owner

@jonhoo jonhoo left a comment

Choose a reason for hiding this comment

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

Sorry for taking so long on this! How do you feel about this proposed change?

@lauti7
Copy link
Author

lauti7 commented Jan 24, 2025

I forgot about this PR, let's merge it! Thank u for the suggestion

@lauti7 lauti7 requested a review from jonhoo January 25, 2025 21:28
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.

3 participants