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

Remove extraneous use statement #4193

Merged
merged 2 commits into from
Jan 8, 2025
Merged

Conversation

Grimmscorpp
Copy link
Contributor

In Listing 14-7 of Chapter 14, the use add_one; statement is redundant and can be removed. Before the Rust 2018 edition, this statement was required to bring the add_one crate into scope, so it likely got missed during refactorings from that transition.

By removing this line, the code becomes more concise and reflects the current best practices for using external crates in Rust.

Issue #4186

In Listing 14-7 of Chapter 14, the `use add_one;` statement is redundant
and can be removed. Before the Rust 2018 edition, this statement was
required to bring the `add_one` crate into scope, so it likely got
missed during refactorings from that transition.

By removing this line, the code becomes more concise and reflects the
current best practices for using external crates in Rust.

Issue #4186
@Grimmscorpp Grimmscorpp changed the title Remove extraneous use statement (#4193) Remove extraneous use statement Jan 7, 2025
Copy link
Contributor

@chriskrycho chriskrycho left a comment

Choose a reason for hiding this comment

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

Thanks! I’m going to revert the unrelated changes to _ from * in other files, then merge!

src/ch06-03-if-let.md Outdated Show resolved Hide resolved
src/ch21-03-graceful-shutdown-and-cleanup.md Outdated Show resolved Hide resolved
src/ch21-03-graceful-shutdown-and-cleanup.md Outdated Show resolved Hide resolved
@chriskrycho chriskrycho merged commit fc64519 into rust-lang:main Jan 8, 2025
3 checks passed
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 13, 2025
Update books

## rust-lang/book

10 commits in 04d06dfe541607e6419f3d028c3f9b245f3be4d9..5a65e2af063ff701ae858f1f7536ee347b3cfe63
2025-01-09 17:59:43 UTC to 2025-01-06 13:47:07 UTC

- Appendix E: Update for 2024 Edition (rust-lang/book#4196)
- Implement and integrate an mdBook plugin to strip markup from headings (rust-lang/book#4195)
- Update appendix-06-translation.md - new persian translation added (rust-lang/book#4192)
- Remove extraneous `use` statement (rust-lang/book#4193)
- Take measurement inaccuracy intervals into account (rust-lang/book#4078)
- Ch. 21.3: remove error ferris from working code (rust-lang/book#4183)
- infra: match mdbook version in CI to rust-lang/rust (rust-lang/book#4191)
- Ch. 17: Set correct heading level for the chapter (rust-lang/book#4190)
- Switch back from `eprintln!` to `println!` in listing 17-12 (rust-lang/book#4178)
- fix typo in Listing invocation for listing 20-14 (rust-lang/book#4184)

## rust-lang/nomicon

1 commits in 7ef05b9777c94836bc92f50f23e6e00981521a89..625b200e5b33a5af35589db0bc454203a3d46d20
2025-01-06 17:17:38 UTC to 2025-01-06 17:17:38 UTC

- Fix accidental inline HTML in Markdown (rust-lang/nomicon#474)

## rust-lang/reference

3 commits in acd6794e712d5e2ef6f5c84fb95688d32a69b816..293af991003772bdccf2d6b980182d84dd055942
2025-01-07 16:31:22 UTC to 2025-01-06 17:17:15 UTC

- Add spec identifiers to dynamically-sized-types.md (rust-lang/reference#1582)
- fix typo in a "rule" name in type-coercions.md (rust-lang/reference#1708)
- Fix unclosed `<sup>` elements (rust-lang/reference#1709)

## rust-lang/rust-by-example

2 commits in 093397535b48ae13ec76bc526b7e6eb8c096a85c..054259ed1bf01cdee4309ee764c7e103f6df3de5
2025-01-13 10:44:04 UTC to 2025-01-03 18:59:26 UTC

- Fix function name in new_types.md in Japanese (rust-lang/rust-by-example#1907)
- Fix typo in static_lifetime.md (rust-lang/rust-by-example#1905)
jhpratt added a commit to jhpratt/rust that referenced this pull request Jan 14, 2025
Update books

## rust-lang/book

10 commits in 04d06dfe541607e6419f3d028c3f9b245f3be4d9..5a65e2af063ff701ae858f1f7536ee347b3cfe63
2025-01-09 17:59:43 UTC to 2025-01-06 13:47:07 UTC

- Appendix E: Update for 2024 Edition (rust-lang/book#4196)
- Implement and integrate an mdBook plugin to strip markup from headings (rust-lang/book#4195)
- Update appendix-06-translation.md - new persian translation added (rust-lang/book#4192)
- Remove extraneous `use` statement (rust-lang/book#4193)
- Take measurement inaccuracy intervals into account (rust-lang/book#4078)
- Ch. 21.3: remove error ferris from working code (rust-lang/book#4183)
- infra: match mdbook version in CI to rust-lang/rust (rust-lang/book#4191)
- Ch. 17: Set correct heading level for the chapter (rust-lang/book#4190)
- Switch back from `eprintln!` to `println!` in listing 17-12 (rust-lang/book#4178)
- fix typo in Listing invocation for listing 20-14 (rust-lang/book#4184)

## rust-lang/nomicon

1 commits in 7ef05b9777c94836bc92f50f23e6e00981521a89..625b200e5b33a5af35589db0bc454203a3d46d20
2025-01-06 17:17:38 UTC to 2025-01-06 17:17:38 UTC

- Fix accidental inline HTML in Markdown (rust-lang/nomicon#474)

## rust-lang/reference

3 commits in acd6794e712d5e2ef6f5c84fb95688d32a69b816..293af991003772bdccf2d6b980182d84dd055942
2025-01-07 16:31:22 UTC to 2025-01-06 17:17:15 UTC

- Add spec identifiers to dynamically-sized-types.md (rust-lang/reference#1582)
- fix typo in a "rule" name in type-coercions.md (rust-lang/reference#1708)
- Fix unclosed `<sup>` elements (rust-lang/reference#1709)

## rust-lang/rust-by-example

2 commits in 093397535b48ae13ec76bc526b7e6eb8c096a85c..054259ed1bf01cdee4309ee764c7e103f6df3de5
2025-01-13 10:44:04 UTC to 2025-01-03 18:59:26 UTC

- Fix function name in new_types.md in Japanese (rust-lang/rust-by-example#1907)
- Fix typo in static_lifetime.md (rust-lang/rust-by-example#1905)
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Jan 14, 2025
Rollup merge of rust-lang#135444 - rustbot:docs-update, r=ehuss

Update books

## rust-lang/book

10 commits in 04d06dfe541607e6419f3d028c3f9b245f3be4d9..5a65e2af063ff701ae858f1f7536ee347b3cfe63
2025-01-09 17:59:43 UTC to 2025-01-06 13:47:07 UTC

- Appendix E: Update for 2024 Edition (rust-lang/book#4196)
- Implement and integrate an mdBook plugin to strip markup from headings (rust-lang/book#4195)
- Update appendix-06-translation.md - new persian translation added (rust-lang/book#4192)
- Remove extraneous `use` statement (rust-lang/book#4193)
- Take measurement inaccuracy intervals into account (rust-lang/book#4078)
- Ch. 21.3: remove error ferris from working code (rust-lang/book#4183)
- infra: match mdbook version in CI to rust-lang/rust (rust-lang/book#4191)
- Ch. 17: Set correct heading level for the chapter (rust-lang/book#4190)
- Switch back from `eprintln!` to `println!` in listing 17-12 (rust-lang/book#4178)
- fix typo in Listing invocation for listing 20-14 (rust-lang/book#4184)

## rust-lang/nomicon

1 commits in 7ef05b9777c94836bc92f50f23e6e00981521a89..625b200e5b33a5af35589db0bc454203a3d46d20
2025-01-06 17:17:38 UTC to 2025-01-06 17:17:38 UTC

- Fix accidental inline HTML in Markdown (rust-lang/nomicon#474)

## rust-lang/reference

3 commits in acd6794e712d5e2ef6f5c84fb95688d32a69b816..293af991003772bdccf2d6b980182d84dd055942
2025-01-07 16:31:22 UTC to 2025-01-06 17:17:15 UTC

- Add spec identifiers to dynamically-sized-types.md (rust-lang/reference#1582)
- fix typo in a "rule" name in type-coercions.md (rust-lang/reference#1708)
- Fix unclosed `<sup>` elements (rust-lang/reference#1709)

## rust-lang/rust-by-example

2 commits in 093397535b48ae13ec76bc526b7e6eb8c096a85c..054259ed1bf01cdee4309ee764c7e103f6df3de5
2025-01-13 10:44:04 UTC to 2025-01-03 18:59:26 UTC

- Fix function name in new_types.md in Japanese (rust-lang/rust-by-example#1907)
- Fix typo in static_lifetime.md (rust-lang/rust-by-example#1905)
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