Skip to content

book: use mod test consistently #24042

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 1 commit into from
Apr 7, 2015
Merged

book: use mod test consistently #24042

merged 1 commit into from
Apr 7, 2015

Conversation

callahad
Copy link
Contributor

@callahad callahad commented Apr 4, 2015

Fixes #24030

Of the four code samples with modules in TRPL:

- 2 use `mod test`
- 2 use `mod tests`

We should be consistent here, but which is right? The stdlib is split:

$ grep -r 'mod tests {' src/lib* | wc -l
      63
$ grep -r 'mod test {'  src/lib* | wc -l
      58

Subjectively, I like the plural, but both the language reference and the
style guide recommend the singular. So we'll go with that here, for now.

r? @steveklabnik

Fixes rust-lang#24030

Of the four code samples with modules in TRPL:

    - 2 use `mod test`
    - 2 use `mod tests`

We should be consistent here, but which is right? The stdlib is split:

    $ grep -r 'mod tests {' src/lib* | wc -l
          63
    $ grep -r 'mod test {'  src/lib* | wc -l
          58

Subjectively, I like the plural, but both the language reference and the
style guide recommend the singular. So we'll go with that here, for now.
@rust-highfive
Copy link
Contributor

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @steveklabnik (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. The way Github handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see CONTRIBUTING.md for more information.

@callahad
Copy link
Contributor Author

callahad commented Apr 4, 2015

This is the singular (mod test) option. For the mod tests option, see #24043

@steveklabnik
Copy link
Member

@bors: r+ rollup

@bors
Copy link
Collaborator

bors commented Apr 6, 2015

📌 Commit cb1e6a2 has been approved by steveklabnik

Manishearth added a commit to Manishearth/rust that referenced this pull request Apr 7, 2015
 Fixes rust-lang#24030

Of the four code samples with modules in TRPL:

    - 2 use `mod test`
    - 2 use `mod tests`

We should be consistent here, but which is right? The stdlib is split:

    $ grep -r 'mod tests {' src/lib* | wc -l
          63
    $ grep -r 'mod test {'  src/lib* | wc -l
          58

Subjectively, I like the plural, but both the language reference and the
style guide recommend the singular. So we'll go with that here, for now.

r? @steveklabnik
@bors
Copy link
Collaborator

bors commented Apr 7, 2015

⌛ Testing commit cb1e6a2 with merge 65a5632...

@bors
Copy link
Collaborator

bors commented Apr 7, 2015

⛄ The build was interrupted to prioritize another pull request.

@bors
Copy link
Collaborator

bors commented Apr 7, 2015

⌛ Testing commit cb1e6a2 with merge dc4af94...

@bors
Copy link
Collaborator

bors commented Apr 7, 2015

⛄ The build was interrupted to prioritize another pull request.

@bors bors merged commit cb1e6a2 into rust-lang:master Apr 7, 2015
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.

The "testing" section of the rust book needs a small correction
4 participants