Commit Graph
4077 Commits
Author SHA1 Message Date
appleJax 77cc92b7c3 revert prettier autofix 2021-01-09 18:09:53 -08:00
appleJax 80721829d0 update 0.8.0 to 0.8.1 2021-01-09 17:54:49 -08:00
appleJax aa0213ebb5 update Cargo.tomls and Cargo.locks 2020-12-28 16:16:58 -08:00
appleJax 080160a5e9 update rand version 2020-12-24 17:13:50 -08:00
Carol (Nichols || Goulding) 77092be1eb Merge pull request #2534 from HollowMan6/patch-1
Fix grammar in ch13-01-closures.md
2020-12-22 21:27:29 -05:00
Carol (Nichols || Goulding) fc9ca867ea Merge remote-tracking branch 'origin/pr/2527' 2020-12-22 21:16:07 -05:00
Carol (Nichols || Goulding) e54f70398e Merge pull request #2485 from adrientremblay/master
Clarify code example ch6.3
2020-12-22 21:10:03 -05:00
Carol (Nichols || Goulding) 1fdea76d94 Fix link added in #2495 to be relative and at the bottom 2020-12-22 21:05:28 -05:00
Carol (Nichols || Goulding) cf1c3d3b64 Merge remote-tracking branch 'origin/pr/2495' 2020-12-22 21:03:12 -05:00
Carol (Nichols || Goulding) b7ad637af6 Update output to match the updated poem punctuation 2020-12-22 21:02:56 -05:00
Carol (Nichols || Goulding) 777f1e7476 Fix #2539 - Remove fancy apostrophes from poem for Windows
Really fix this for real this time. Real real real.
2020-12-22 20:24:31 -05:00
Hollow Man acfbeb3659 Fix grammar in ch13-01-closures.md
in to -> into
2020-12-20 22:53:43 +08:00
Carol (Nichols || Goulding) 5bb44f8b5b Make some further edits to #2447 2020-12-18 20:07:31 -05:00
Carol (Nichols || Goulding) 77e1f2ae93 Merge remote-tracking branch 'origin/pr/2447' 2020-12-18 20:05:01 -05:00
Carol (Nichols || Goulding) d7b29fa9c3 Remove copied and dangling link brackets 2020-12-18 19:58:08 -05:00
Carol (Nichols || Goulding) 5b2bd2b3c7 Merge remote-tracking branch 'origin/pr/2359' 2020-12-18 19:56:41 -05:00
Carol (Nichols || Goulding) 904b721ee9 Merge pull request #2528 from apogeeoak/actions
Override toolchain to nightly for run lints action.
2020-12-18 19:43:24 -05:00
apogeeoak 58d5060330 Override toolchain back to nightly. 2020-12-17 19:39:02 -05:00
apogeeoak 44f928374f Remove leftover reference in Ch 16-03. 2020-12-17 10:01:51 -05:00
Steve Klabnik b702f3bb15 Merge pull request #1752 from rust-lang/gh1744
Remove an uneeded 'static lifetime
2020-12-14 10:24:47 -06:00
Carol (Nichols || Goulding) b4e5fcc554 Fixes #2330. Clarify why the lock is held too long 2020-12-13 21:09:07 -05:00
Carol (Nichols || Goulding) 4275162b3f Explain that we do need to have 'static now 2020-12-10 22:12:51 -05:00
Carol (Nichols || Goulding) 0b81c3bd0c Remove an unneeded link 2020-12-10 22:12:45 -05:00
Carol (Nichols || Goulding) def6530bfa I think this code formatted string literal should include the quotes 2020-12-10 22:12:23 -05:00
Carol (Nichols || Goulding) 5d57100a14 Remove the rest of the unneeded 'statics 2020-12-10 22:12:14 -05:00
Steve Klabnik 360960eb3f Remove an uneeded 'static lifetime
Fixes #1744
2020-12-10 22:11:40 -05:00
Carol (Nichols || Goulding) 15b20d3c6d Merge pull request #2304 from rashiq/rashiq-chapter-1.2-rusftmt
Update paragraph about rustfmt in Chapter 1.2
2020-12-10 21:30:28 -05:00
Carol (Nichols || Goulding) 015d14864d Clarify language around further from #2418 2020-12-10 21:27:22 -05:00
Carol (Nichols || Goulding) 1686f99a22 Merge remote-tracking branch 'origin/pr/2418' 2020-12-10 21:21:37 -05:00
Carol (Nichols || Goulding) 943c6b8e0f Merge remote-tracking branch 'origin/pr/2475' 2020-12-09 22:04:04 -05:00
Carol (Nichols || Goulding) b34bb93b2d Add some further edits to #2433 2020-12-09 21:50:40 -05:00
Carol (Nichols || Goulding) 14e2174a58 Merge remote-tracking branch 'origin/pr/2433' 2020-12-09 21:48:41 -05:00
Carol (Nichols || Goulding) 6b111ac28e Note all the method families to handle integer overflow 2020-12-09 21:45:27 -05:00
Carol (Nichols || Goulding) c120b9f2cd Merge remote-tracking branch 'origin/pr/2405' 2020-12-09 21:35:12 -05:00
Carol (Nichols || Goulding) cdb13945ac Fix #1855 - incorporate new reference cycle diagram 2020-12-09 21:30:50 -05:00
Carol (Nichols || Goulding) d28183f901 Make some further edits to the changes in #1886 2020-12-09 21:30:13 -05:00
Carol (Nichols || Goulding) ea49874970 Merge remote-tracking branch 'origin/pr/1886' 2020-12-09 21:14:53 -05:00
Carol (Nichols || Goulding) 8a1aad812b Make some further edits to #1998 2020-12-09 21:01:59 -05:00
Carol (Nichols || Goulding) 5afb67affe Merge remote-tracking branch 'origin/pr/1998' 2020-12-09 21:00:10 -05:00
Steve Klabnik 7e180123f0 Merge pull request #2518 from rust-lang/update-rustc
Update Rust version and output
2020-12-09 09:35:45 -06:00
Carol (Nichols || Goulding) 322899b375 Re-fix #2516 - Make a new listing for final code of ch 20
I was trying to reuse too much; we don't want the `take(2)` to be part
of the final code, but we do want it to be in the listing for the
example where we shut down gracefully after 2 requests.
2020-12-08 21:30:00 -05:00
Carol (Nichols || Goulding) eb60fedc9c A solution for empty main in lib.rs, I think!
The reasons we needed empty `fn main() {}`s were twofold:

- Avoid confusing people when they click the "expand" button on the code
listing and see the auto-main wrapping
- Avoid failing doctests when running `mdbook test` that don't work when
rustdoc wraps a code listing in main

I think I have a solution that mostly solves these cases.

I don't know why this didn't occur to me before. Here's my current
thinking in case these assumptions turn out to be wrong:

There are a [few things that tell mdbook to disable the
main-wrapping][mdbook], and I hadn't noticed one of them until now: if
you annotate a code block with `noplayground`, it won't add a `main`
around it (and it also won't have the "play" button in the upper right
that runs the block and inserts the result into the page).

So instead of putting an empty `fn main() {}` at the bottom of
src/lib.rs files that doesn't make sense, annotate those listings with
`noplayground`. I don't think anyone will miss the play button anyway
because:

- The play button doesn't run tests, so there wasn't any output for
these examples anyway
- If an example doesn't compile, we have it marked `ignore` so that it
doesn't make the tests fail, and `ignore` also disables the play button,
so there isn't a way to see compiler errors either

In most of these cases, `mdbook test` that runs these as doctests will
still wrap these in main, but the tests still pass.

There are some cases, mostly around modules and using `crate::` that
won't pass as doctests when wrapped in main. For those, I've annotated
them with the [undocumented][] [`test_harness`][] attribute that apparently
I was using at some point and then [stopped using][] and now I've
decided to use again, but maybe send in a PR to rust-lang/rust to
change the name to `no_main` and document it or something. In any case,
that shouldn't affect readers at all.

[mdbook]: https://github.com/rust-lang/mdBook/blob/d0deee90b04068ed949f524bb682a47fa26f2218/src/renderer/html_handlebars/hbs_renderer.rs#L805-L808
[undocumented]: https://github.com/rust-lang/rust/issues/42288#issuecomment-309661382
[`test_harness`]: https://github.com/rust-lang/rust/blob/220352781c2585f0efb07ab0e758b136514de5b8/src/librustdoc/doctest.rs#L252
[stopped using]: https://github.com/rust-lang/book/pull/1233#discussion_r175515585
2020-12-08 21:30:00 -05:00
Carol (Nichols || Goulding) 359895c6b2 Manual regeneration of output at 1.48 2020-12-05 14:18:31 -05:00
Carol (Nichols || Goulding) 4cd410bab6 Update to 1.48 2020-12-05 14:18:30 -05:00
Carol (Nichols || Goulding) 2567c35e84 Update to Rust 1.47 2020-12-05 14:18:30 -05:00
Carol (Nichols || Goulding) 4895996a3f Update to 1.46 2020-12-05 14:18:30 -05:00
Carol (Nichols || Goulding) d28480ea67 Use single quotes when shell expansions aren't needed 2020-12-05 14:18:30 -05:00
Carol (Nichols || Goulding) b82bcd8f56 Use @ instead of slash to avoid some escaping 2020-12-05 14:18:29 -05:00
Carol (Nichols || Goulding) 2dca6c3e78 Update to 1.45 2020-12-05 14:18:29 -05:00
Carol (Nichols || Goulding) e894f58929 Update to 1.44 2020-12-05 14:18:29 -05:00