Skip to content

Commit 8fb9ad0

Browse files
mejrskpreid
andauthored
Apply suggestions from code review
Co-authored-by: Kevin Reid <[email protected]>
1 parent b8e21b4 commit 8fb9ad0

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/frequently-requested-changes.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -218,25 +218,25 @@ Cross-referencing to other discussions:
218218
* <https://github.com/rust-lang/rust/issues/17027>
219219
* <https://github.com/rust-lang/unsafe-code-guidelines/issues/176>
220220

221-
## A way to bypass visibility, including a `unsafe` bypass
221+
## A way to bypass visibility, including an `unsafe` bypass
222222

223-
Items are only accessible if they are marked `pub` or re-exported as such,
223+
Items are only accessible if they are marked `pub` or re-exported as such;
224224
they are otherwise private by default. People sometimes wish to break that
225225
rule to access internals of libraries they're using, for example to access
226226
private fields of a type or to call private functions.
227227

228-
This could break invariants assumed by the crate's author, which if any
229-
unsafe code depends on those could lead to undefined behavior.
228+
This could break invariants assumed by the crate's author, which, if any
229+
unsafe code depends on those, could lead to undefined behavior.
230230

231-
More importantly, allowing people to violate privacy would destroy semver.
231+
More importantly, allowing people to violate privacy would destroy SemVer.
232232
If people can access and use implementation details of other crates then
233233
that means that almost any change is now a breaking change. This would lead
234234
to widespread fallout across the crate ecosystem.
235235

236236
Making it `unsafe` does nothing to prevent these issues. `unsafe` is
237237
used to deal with memory safety problems and it is not in any way useful to
238-
deal with semver concerns.
238+
deal with SemVer concerns.
239239

240240
Forking a crate (to insert the necessary `pub`s) does not have these
241-
problems. As such a better way to achieve this would be to make patch
241+
problems. As such, a better way to achieve this would be to make patch
242242
dependencies more ergonomic to use and maintain.

0 commit comments

Comments
 (0)