]> git.lizzy.rs Git - rust.git/blobdiff - src/doc/complement-design-faq.md
Auto merge of #21401 - kballard:optimize-shrink-to-fit, r=nikomatsakis
[rust.git] / src / doc / complement-design-faq.md
index 9a2531f094c17e5b0e2773b4fd2292278970ce5a..e57953db3a256fd2463ad6a04d3015dccd830c96 100644 (file)
@@ -95,7 +95,7 @@ code should need to run is a stack.
 `match` being exhaustive has some useful properties. First, if every
 possibility is covered by the `match`, adding further variants to the `enum`
 in the future will prompt a compilation failure, rather than runtime panic.
-Second, it makes cost explicit. In general, only safe way to have a
+Second, it makes cost explicit. In general, the only safe way to have a
 non-exhaustive match would be to panic the task if nothing is matched, though
 it could fall through if the type of the `match` expression is `()`. This sort
 of hidden cost and special casing is against the language's philosophy. It's