Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rust-lang/book
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 7dabd55
Choose a base ref
...
head repository: rust-lang/book
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 45c58f9
Choose a head ref
  • 15 commits
  • 186 files changed
  • 3 contributors

Commits on Nov 23, 2020

  1. Fix typo

    ejez authored Nov 23, 2020
    Configuration menu
    Copy the full SHA
    f51282c View commit details
    Browse the repository at this point in the history

Commits on Dec 5, 2020

  1. Merge pull request #2509 from ejez/patch-1

    Fix typo, regarding privileged ports being up to 1023 instead of 1024
    carols10cents authored Dec 5, 2020
    Configuration menu
    Copy the full SHA
    1ab83e0 View commit details
    Browse the repository at this point in the history
  2. Update to 1.42

    carols10cents committed Dec 5, 2020
    Configuration menu
    Copy the full SHA
    6e98805 View commit details
    Browse the repository at this point in the history
  3. Try saving the test binary hash to not have to wade through those in …

    …the diffs
    
    There are a few output files that have more than one test binaries; make
    their hashes be the same because I'm too tired to figure out how to
    capture and replace multiple different hashes.
    carols10cents committed Dec 5, 2020
    Configuration menu
    Copy the full SHA
    17618d8 View commit details
    Browse the repository at this point in the history
  4. Update to 1.43

    carols10cents committed Dec 5, 2020
    Configuration menu
    Copy the full SHA
    63bc410 View commit details
    Browse the repository at this point in the history
  5. Update to 1.44

    carols10cents committed Dec 5, 2020
    Configuration menu
    Copy the full SHA
    e894f58 View commit details
    Browse the repository at this point in the history
  6. Update to 1.45

    carols10cents committed Dec 5, 2020
    Configuration menu
    Copy the full SHA
    2dca6c3 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    b82bcd8 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    d28480e View commit details
    Browse the repository at this point in the history
  9. Update to 1.46

    carols10cents committed Dec 5, 2020
    Configuration menu
    Copy the full SHA
    4895996 View commit details
    Browse the repository at this point in the history
  10. Update to Rust 1.47

    carols10cents committed Dec 5, 2020
    Configuration menu
    Copy the full SHA
    2567c35 View commit details
    Browse the repository at this point in the history
  11. Update to 1.48

    carols10cents committed Dec 5, 2020
    Configuration menu
    Copy the full SHA
    4cd410b View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    359895c View commit details
    Browse the repository at this point in the history

Commits on Dec 9, 2020

  1. 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]: rust-lang/rust#42288 (comment)
    [`test_harness`]: https://github.com/rust-lang/rust/blob/220352781c2585f0efb07ab0e758b136514de5b8/src/librustdoc/doctest.rs#L252
    [stopped using]: #1233 (comment)
    carols10cents committed Dec 9, 2020
    Configuration menu
    Copy the full SHA
    6f92dcd View commit details
    Browse the repository at this point in the history
  2. 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.
    carols10cents committed Dec 9, 2020
    Configuration menu
    Copy the full SHA
    45c58f9 View commit details
    Browse the repository at this point in the history
Loading