Skip to content

Unify the style of combinator type descriptions #1501

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

Merged
merged 2 commits into from
Mar 28, 2019

Conversation

taiki-e
Copy link
Member

@taiki-e taiki-e commented Mar 26, 2019

Although I did not read each one in detail, I excluded those that might have explained in more detail than the functions/methods and those that would be unified if other PR(#1492) landed.

Closes #1214

@Nemo157
Copy link
Member

Nemo157 commented Mar 26, 2019

😁 I was thinking about doing exactly this soon after re-noticing the inconsistency in #1492.

/// A future which is never resolved.
///
/// This future can be created with the [`empty()`] function.
/// Future for the [`empty`] combinator.
Copy link
Member

Choose a reason for hiding this comment

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

Are the free functions still "combinator"s? Maybe a better term here would be "constructor"?

Copy link
Member Author

Choose a reason for hiding this comment

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

-- or drop "combinator"?

Copy link
Member

@Nemo157 Nemo157 Mar 28, 2019

Choose a reason for hiding this comment

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

Dropping "combinator" and rephrasing slightly to

Future produced by [`empty`].

seems ok to me.

Copy link
Member Author

Choose a reason for hiding this comment

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

It may be easier to understand using "function"s and "method"s rather than "combinator"s (I do not think that functions like join_all is "constructor").

Copy link
Member

Choose a reason for hiding this comment

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

That makes sense as well, so just replace "combinator" directly with "function" or "method" depending on which it is (or even go with just "function" everywhere since method is a sub-category of function).

Copy link
Member

Choose a reason for hiding this comment

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

Checking the std docs they do differentiate between "function" or "method" for the iterator types, and don't mention "combinator" at all:

This struct is created by the once function.

This struct is created by the filter method on Iterator.

@taiki-e taiki-e force-pushed the docs-combinator-descriptions branch from b15af51 to 7f3f471 Compare March 28, 2019 14:13
@Nemo157 Nemo157 merged commit 64eb779 into rust-lang:master Mar 28, 2019
@taiki-e taiki-e deleted the docs-combinator-descriptions branch March 28, 2019 17:07
@Nemo157
Copy link
Member

Nemo157 commented Mar 28, 2019

Cool, thanks a lot for cleaning this up ❤️

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