1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-06-14 21:35:00 +02:00
Commit Graph

799 Commits

Author SHA1 Message Date
a532c23c60 Simplify wording of constexpr/const relation
Co-authored-by: Martin Geisler <mgeisler@google.com>
2023-01-10 05:05:26 -08:00
1196622b7a Removed magic incantation that should just be behind the link 2023-01-10 22:03:47 +09:00
4fd8a2ca62 Rephrase bullet point in copy/clone slide 2023-01-10 14:01:08 +01:00
3eecb4bef6 Add time of writing to reflect current status quo that might change
Co-authored-by: Martin Geisler <mgeisler@google.com>
2023-01-10 05:00:59 -08:00
87b26c78c0 Add not about C++ copy constructors 2023-01-10 13:57:15 +01:00
65837087c9 Copy, clone speaker notes: phrase as sentences i/o questions 2023-01-10 13:55:43 +01:00
d1a3290cd6 Add reference to collect, FromIterator 2023-01-10 11:40:02 +01:00
b1069f863c Add example for underscore syntax with generics (type-inference.md) 2023-01-10 11:30:48 +01:00
e29c3bfb99 Merge pull request #123 from ilyagr/username_or_error
Error handling: clarify printing of Result
2023-01-10 10:21:43 +01:00
e43dec24fd Tighten language 2023-01-10 09:29:57 +01:00
89ddb2c197 Added notes, runtime constant eval, and footnoes to static-and-const.md 2023-01-10 13:41:31 +09:00
d15a653ed8 Added some speaker notes to variables.md 2023-01-10 13:27:39 +09:00
6a2889d8ce Add more info and footnotes to rust-ecosystem.md 2023-01-10 13:10:16 +09:00
cec5e6d64e Added information on Jetbrains 2023-01-10 12:42:38 +09:00
4172e7587c Added some more detail on rustup.
Rusutp is the reccomended way to install rust and maintained by the core
team.

I added some organization and suggested that that be the method of
installation.
2023-01-10 12:36:51 +09:00
bee9cdab92 Merge pull request #136 from fbornhofen/speaker-notes-variables
Add speaker notes for scopes-shadowing.md
2023-01-09 18:44:29 +01:00
c5824aece0 Merge pull request #134 from fbornhofen/speaker-notes-fbornhofen
Speaker notes for lifetimes-function-calls.md
2023-01-09 18:43:56 +01:00
2ec7bdf15d Ignore code block that deliberately contains an error 2023-01-09 17:36:58 +01:00
3a4d5d4c26 Add complete code block for lifetimes example 2023-01-09 17:32:37 +01:00
77d3ac01e7 Add speaker notes for scopes-shadowing.md 2023-01-09 17:21:54 +01:00
ba09385c4a Add bullet point about mutable references 2023-01-09 16:54:14 +01:00
512dedf729 Make instructions in lifetimes-function-calls.md more precise 2023-01-09 16:31:09 +01:00
597c875442 Add speaker notes to lifetimes-function-calls.md 2023-01-09 16:27:10 +01:00
6fac027dd6 Updates PR with code formatting
Backticks for inline and single line code blocks / examples.
2023-01-09 14:42:27 +00:00
9cd5d25821 Adds speaker notes to Compound Types section
Speaker notes for 6. Basic Syntax, 6.2 Compound Types section.
Briefly explains arrays and tuples properties.
Adds option for instructor to check for out of bounds errors using assert!().
2023-01-09 14:18:37 +00:00
3ff2d5f43a Merge pull request #118 from google/exercise-code-snippets
Explain why exercises are not editable
2023-01-09 14:42:54 +01:00
affb2526fe Explain why exercises are not editable
From a discussion in #23.
2023-01-09 14:41:48 +01:00
e835ee6cdf Add notes to threads.md
From the discussion in #63.
2023-01-09 14:32:04 +01:00
f4b753b7c5 Speaker notes for “Rust Ecosystem” 2023-01-09 14:27:13 +01:00
62d206506f Speaker notes for “Running Cargo Locally” 2023-01-09 14:27:13 +01:00
3db19fd2e5 Speaker notes for “Using Cargo” 2023-01-09 14:27:13 +01:00
b1e11304a7 Speaker notes for “Runtime Guarantees” 2023-01-09 14:27:13 +01:00
ba3c6b0de9 Speaker notes for “Modern Features” 2023-01-09 14:27:13 +01:00
cf505e99cd Rephrase “No memory leaks”
The footnote was added before we had support for speaker notes. It’s
too large to show on the screen during a classroom presentation, so it
has now been moved to the speaker notes.

I tried to keep the information intact, including keeping the word
“mostly” on the slide.
2023-01-09 14:26:47 +01:00
a7adf49002 Speaker notes for “Why Rust?” 2023-01-09 14:26:47 +01:00
50b0ad76eb Introduce speaker notes on welcome page 2023-01-09 14:24:02 +01:00
0723135dc6 Remove bullet point about printing p1 2023-01-09 13:39:39 +01:00
45bc1233d2 s/twice/again/ 2023-01-09 13:37:06 +01:00
e213f9dbd3 Add speaker notes to copy-clone.md 2023-01-09 13:20:00 +01:00
b287aeada1 Fix typo in structure.md 2023-01-09 02:01:28 +08:00
7e0670e6b7 Merge pull request #126 from marshallpierce/patch-2
Use rustls instead of openssl
2023-01-07 14:50:18 +01:00
3f4ae0606d Update broken links 2023-01-07 15:38:40 +08:00
b67908698f Use rustls instead of openssl
Using the `rustls-tls` feature on reqwest will use rustls and ring, which should compile on any system.
2023-01-06 15:22:40 -07:00
68eed5b4f2 Error handling: clarify printing of Result
Two examples may print either `Ok(username)` or `Err(error)`.
This commit clarifies this fact.
2023-01-06 12:35:05 -08:00
0a9dd33e58 Create an empty rather than pre-allocating
It might give the impression that you can only write to a Vec that has capacity, when in fact Vec's Write impl will grow the storage as needed. While pre-allocating is probably a good efficiency win in many circumstances, I think it's probably worth minimizing the number of concepts in play in this example.
2023-01-06 09:47:42 -07:00
c8f626e573 for-loop bonus explanation (#108)
* for-loop bonus explanation
2023-01-06 10:15:16 +01:00
9a68434cac Merge pull request #49 from ilyagr/patch-1
`anyhow`: Remove `ReadUsernameError::IoError`
2023-01-05 15:57:17 +01:00
e1c670c4a8 Fix a typo in result.md
"have already see" -> "have already seen"
2023-01-05 14:41:40 +06:00
8feb6b4ad4 Merge pull request #109 from rhapsodyai/fixes-99
Fixes: #99
2023-01-05 09:08:03 +01:00
d5359fa92a Add support for speaker notes
This implements a system for speaker notes via `details` elements and
some JavaScript. The general idea is

1. You add speaker notes to each page by wrapping some Markdown code
   in `<details> … </details>`. This is a standard HTML element for,
   well extra details. Browsers will render the element with a toggle
   control for showing/hiding the content.

2. We inject JavaScript on every page which finds these speaker note
   elements. They’re styled slightly and we keep their open/closed
   state in a browser local storage. This ensures that you can keep
   them open/closed across page loads.

3. We add a link to the speaker notes which will open in a new tab.
   The URL is amended with `#speaker-notes-open`, which we detect in
   the new tab: we hide the other content in this case.
   Simultaneously, we hide the speaker notes in the original window.

4. When navigating to a new page, we signal this to the other window.
   We then navigate to the same page. The logic above kicks in and
   hides the right part of the content. This lets the users page
   through the course using either the regular window or the speaker
   notes — the result is the same and both windows stay in sync.

Tested in both Chrome and Firefox. When using a popup speaker note
window, the content loads more smoothly in Chrome, but it still works
fine in Firefox.

Fixes #53.
2023-01-05 07:46:18 +01:00