Skip to content
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

Misleading textual statement in HOF #1731

Merged
merged 1 commit into from
Sep 26, 2023
Merged

Conversation

kberov
Copy link
Contributor

@kberov kberov commented Jul 27, 2023

The example checks if the calculated square is less than 1000, and if it is odd, then adds it to the sum - not if the not squared number is odd. The amount of calculations is much lower than if it was checking if the not squared number is less than 1000 and then square it and add it to the sum.

The example checks if the calculated square is less than 1000, and if it
is odd, then adds it to the sum - not if the not squared number is odd.
The amount of calculations is much lower than if it was checking if the
not squared number is less than 1000 and then square it and add it to
the sum.
@rustbot
Copy link
Collaborator

rustbot commented Jul 27, 2023

r? @marioidival

(rustbot has picked a reviewer for you, use r? to override)

@marioidival marioidival merged commit b246afd into rust-lang:master Sep 26, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 9, 2023
Update books

## rust-lang/reference

2 commits in 5262e1c3b43a2c489df8f6717683a44c7a2260fd..142b2ed77d33f37a9973772bd95e6144ed9dce43
2023-10-07 19:41:21 UTC to 2023-09-26 12:26:35 UTC

- replace 'UB on raw ptr deref' with UB on place projection/access (rust-lang/reference#1387)
- docs: Fix links to ECMA standards in `attributes.md` (rust-lang/reference#1408)

## rust-lang/rust-by-example

11 commits in c954202c1e1720cba5628f99543cc01188c7d6fc..8eb3a01ab74c567b7174784892fb807f2c632d6b
2023-09-26 12:38:17 UTC to 2023-09-26 12:29:10 UTC

- fixed a typo in the lifetime.md (rust-lang/rust-by-example#1737)
- Misleading textual statement in HOF (rust-lang/rust-by-example#1731)
- Equalize title from respective file with title in SUMMARY.md (rust-lang/rust-by-example#1738)
- Added explanation for compiling and executing match_args.rs. (rust-lang/rust-by-example#1739)
- Wrapped long lines and put #[doc] in backquotes. (rust-lang/rust-by-example#1740)
- Update read_lines example to flatten iterator (rust-lang/rust-by-example#1742)
- Update while_let.md: address inconsistent use of fn main between 2 co… (rust-lang/rust-by-example#1744)
- [TRIVIAL] Remove confusing `also` (rust-lang/rust-by-example#1746)
- Fix and extend the explanation of outer vs inner attributes. (rust-lang/rust-by-example#1748)
- Fix uncorresponded back quote (rust-lang/rust-by-example#1749)
- Fix format in constants.md (rust-lang/rust-by-example#1741)

## rust-lang/rustc-dev-guide

3 commits in a13b7c28ed705891c681ce5417b3d1cdb12cecd1..b98af7d661e4744baab81fb8dc7a049e44a4a998
2023-10-05 19:48:35 UTC to 2023-09-27 22:57:27 UTC

- update new trait solver docs (rust-lang/rustc-dev-guide#1802)
- update rustc_driver examples (rust-lang/rustc-dev-guide#1803)
- test headers: fix `compile-flags` example (rust-lang/rustc-dev-guide#1800)
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 10, 2023
Update books

## rust-lang/reference

2 commits in 5262e1c3b43a2c489df8f6717683a44c7a2260fd..142b2ed77d33f37a9973772bd95e6144ed9dce43
2023-10-07 19:41:21 UTC to 2023-09-26 12:26:35 UTC

- replace 'UB on raw ptr deref' with UB on place projection/access (rust-lang/reference#1387)
- docs: Fix links to ECMA standards in `attributes.md` (rust-lang/reference#1408)

## rust-lang/rust-by-example

11 commits in c954202c1e1720cba5628f99543cc01188c7d6fc..8eb3a01ab74c567b7174784892fb807f2c632d6b
2023-09-26 12:38:17 UTC to 2023-09-26 12:29:10 UTC

- fixed a typo in the lifetime.md (rust-lang/rust-by-example#1737)
- Misleading textual statement in HOF (rust-lang/rust-by-example#1731)
- Equalize title from respective file with title in SUMMARY.md (rust-lang/rust-by-example#1738)
- Added explanation for compiling and executing match_args.rs. (rust-lang/rust-by-example#1739)
- Wrapped long lines and put #[doc] in backquotes. (rust-lang/rust-by-example#1740)
- Update read_lines example to flatten iterator (rust-lang/rust-by-example#1742)
- Update while_let.md: address inconsistent use of fn main between 2 co… (rust-lang/rust-by-example#1744)
- [TRIVIAL] Remove confusing `also` (rust-lang/rust-by-example#1746)
- Fix and extend the explanation of outer vs inner attributes. (rust-lang/rust-by-example#1748)
- Fix uncorresponded back quote (rust-lang/rust-by-example#1749)
- Fix format in constants.md (rust-lang/rust-by-example#1741)

## rust-lang/rustc-dev-guide

3 commits in a13b7c28ed705891c681ce5417b3d1cdb12cecd1..b98af7d661e4744baab81fb8dc7a049e44a4a998
2023-10-05 19:48:35 UTC to 2023-09-27 22:57:27 UTC

- update new trait solver docs (rust-lang/rustc-dev-guide#1802)
- update rustc_driver examples (rust-lang/rustc-dev-guide#1803)
- test headers: fix `compile-flags` example (rust-lang/rustc-dev-guide#1800)
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 10, 2023
Update books

## rust-lang/reference

2 commits in 5262e1c3b43a2c489df8f6717683a44c7a2260fd..142b2ed77d33f37a9973772bd95e6144ed9dce43
2023-10-07 19:41:21 UTC to 2023-09-26 12:26:35 UTC

- replace 'UB on raw ptr deref' with UB on place projection/access (rust-lang/reference#1387)
- docs: Fix links to ECMA standards in `attributes.md` (rust-lang/reference#1408)

## rust-lang/rust-by-example

11 commits in c954202c1e1720cba5628f99543cc01188c7d6fc..8eb3a01ab74c567b7174784892fb807f2c632d6b
2023-09-26 12:38:17 UTC to 2023-09-26 12:29:10 UTC

- fixed a typo in the lifetime.md (rust-lang/rust-by-example#1737)
- Misleading textual statement in HOF (rust-lang/rust-by-example#1731)
- Equalize title from respective file with title in SUMMARY.md (rust-lang/rust-by-example#1738)
- Added explanation for compiling and executing match_args.rs. (rust-lang/rust-by-example#1739)
- Wrapped long lines and put #[doc] in backquotes. (rust-lang/rust-by-example#1740)
- Update read_lines example to flatten iterator (rust-lang/rust-by-example#1742)
- Update while_let.md: address inconsistent use of fn main between 2 co… (rust-lang/rust-by-example#1744)
- [TRIVIAL] Remove confusing `also` (rust-lang/rust-by-example#1746)
- Fix and extend the explanation of outer vs inner attributes. (rust-lang/rust-by-example#1748)
- Fix uncorresponded back quote (rust-lang/rust-by-example#1749)
- Fix format in constants.md (rust-lang/rust-by-example#1741)

## rust-lang/rustc-dev-guide

3 commits in a13b7c28ed705891c681ce5417b3d1cdb12cecd1..b98af7d661e4744baab81fb8dc7a049e44a4a998
2023-10-05 19:48:35 UTC to 2023-09-27 22:57:27 UTC

- update new trait solver docs (rust-lang/rustc-dev-guide#1802)
- update rustc_driver examples (rust-lang/rustc-dev-guide#1803)
- test headers: fix `compile-flags` example (rust-lang/rustc-dev-guide#1800)
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Oct 10, 2023
Update books

## rust-lang/reference

2 commits in 5262e1c3b43a2c489df8f6717683a44c7a2260fd..142b2ed77d33f37a9973772bd95e6144ed9dce43
2023-10-07 19:41:21 UTC to 2023-09-26 12:26:35 UTC

- replace 'UB on raw ptr deref' with UB on place projection/access (rust-lang/reference#1387)
- docs: Fix links to ECMA standards in `attributes.md` (rust-lang/reference#1408)

## rust-lang/rust-by-example

11 commits in c954202c1e1720cba5628f99543cc01188c7d6fc..8eb3a01ab74c567b7174784892fb807f2c632d6b
2023-09-26 12:38:17 UTC to 2023-09-26 12:29:10 UTC

- fixed a typo in the lifetime.md (rust-lang/rust-by-example#1737)
- Misleading textual statement in HOF (rust-lang/rust-by-example#1731)
- Equalize title from respective file with title in SUMMARY.md (rust-lang/rust-by-example#1738)
- Added explanation for compiling and executing match_args.rs. (rust-lang/rust-by-example#1739)
- Wrapped long lines and put #[doc] in backquotes. (rust-lang/rust-by-example#1740)
- Update read_lines example to flatten iterator (rust-lang/rust-by-example#1742)
- Update while_let.md: address inconsistent use of fn main between 2 co… (rust-lang/rust-by-example#1744)
- [TRIVIAL] Remove confusing `also` (rust-lang/rust-by-example#1746)
- Fix and extend the explanation of outer vs inner attributes. (rust-lang/rust-by-example#1748)
- Fix uncorresponded back quote (rust-lang/rust-by-example#1749)
- Fix format in constants.md (rust-lang/rust-by-example#1741)

## rust-lang/rustc-dev-guide

3 commits in a13b7c28ed705891c681ce5417b3d1cdb12cecd1..b98af7d661e4744baab81fb8dc7a049e44a4a998
2023-10-05 19:48:35 UTC to 2023-09-27 22:57:27 UTC

- update new trait solver docs (rust-lang/rustc-dev-guide#1802)
- update rustc_driver examples (rust-lang/rustc-dev-guide#1803)
- test headers: fix `compile-flags` example (rust-lang/rustc-dev-guide#1800)
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Oct 10, 2023
Rollup merge of rust-lang#116574 - rustbot:docs-update, r=ehuss

Update books

## rust-lang/reference

2 commits in 5262e1c3b43a2c489df8f6717683a44c7a2260fd..142b2ed77d33f37a9973772bd95e6144ed9dce43
2023-10-07 19:41:21 UTC to 2023-09-26 12:26:35 UTC

- replace 'UB on raw ptr deref' with UB on place projection/access (rust-lang/reference#1387)
- docs: Fix links to ECMA standards in `attributes.md` (rust-lang/reference#1408)

## rust-lang/rust-by-example

11 commits in c954202c1e1720cba5628f99543cc01188c7d6fc..8eb3a01ab74c567b7174784892fb807f2c632d6b
2023-09-26 12:38:17 UTC to 2023-09-26 12:29:10 UTC

- fixed a typo in the lifetime.md (rust-lang/rust-by-example#1737)
- Misleading textual statement in HOF (rust-lang/rust-by-example#1731)
- Equalize title from respective file with title in SUMMARY.md (rust-lang/rust-by-example#1738)
- Added explanation for compiling and executing match_args.rs. (rust-lang/rust-by-example#1739)
- Wrapped long lines and put #[doc] in backquotes. (rust-lang/rust-by-example#1740)
- Update read_lines example to flatten iterator (rust-lang/rust-by-example#1742)
- Update while_let.md: address inconsistent use of fn main between 2 co… (rust-lang/rust-by-example#1744)
- [TRIVIAL] Remove confusing `also` (rust-lang/rust-by-example#1746)
- Fix and extend the explanation of outer vs inner attributes. (rust-lang/rust-by-example#1748)
- Fix uncorresponded back quote (rust-lang/rust-by-example#1749)
- Fix format in constants.md (rust-lang/rust-by-example#1741)

## rust-lang/rustc-dev-guide

3 commits in a13b7c28ed705891c681ce5417b3d1cdb12cecd1..b98af7d661e4744baab81fb8dc7a049e44a4a998
2023-10-05 19:48:35 UTC to 2023-09-27 22:57:27 UTC

- update new trait solver docs (rust-lang/rustc-dev-guide#1802)
- update rustc_driver examples (rust-lang/rustc-dev-guide#1803)
- test headers: fix `compile-flags` example (rust-lang/rustc-dev-guide#1800)
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