Skip to content

Clarify string slice parameter wording - #4827

Open
Rayan-and-beyond wants to merge 1 commit into
rust-lang:mainfrom
Rayan-and-beyond:docs/string-slice-4816
Open

Rayan-and-beyond wants to merge 1 commit into
rust-lang:mainfrom
Rayan-and-beyond:docs/string-slice-4816

Conversation

@Rayan-and-beyond

Copy link
Copy Markdown

Fixes #4816.

Clarifies that the comparison is between a parameter typed as &str and one typed as &String. The surrounding text already explains that deref coercion lets the &str parameter accept both &String and &str values.

Validation:

  • git diff --check
  • dprint check src/ch04-03-slices.md reports one existing formatting mismatch at line 28 (*part* vs _part_); the same failure reproduces on an untouched main copy, and this change does not touch that line.

This branch has not been deployed

No deployments
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.

string slices phrasing, ch04-03

1 participant