1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-04-17 22:16:18 +02:00

54 Commits

Author SHA1 Message Date
Martin Geisler
841359f5df
Simplify methods slide (#594)
This tightens the language slightly. I also added a speaker note with
suggestions for more methods to add (if there is time).
2023-05-03 12:01:21 +02:00
Martin Geisler
4a09d053ac
Simplify fizz buzz slide (#595)
There is no need to introduce `match` here where we don’t have time to
talk about it in detail.
2023-05-03 09:56:58 +02:00
Martin Geisler
f895ffc5a8
Remove exotic string types from scalar type slide (#593)
When teaching the class, I’ve noticed that raw strings and byte
strings tend to cause confusion. The slide is meant to be a friendly
introduction and show how Rust is similar to other languages like C
and C++. Instead, the string types cause a ton of questions which are
unnecessary at this early point.

The information is still there, but now in the form of a speaker note.
2023-04-27 19:57:07 +02:00
Dustin J. Mitchell
3b538b582d
Add a brief mention of doc comments (#509) 2023-03-21 12:15:07 -04:00
Adam MacBeth
9bb586689a
Minor grammar fixes to type-inference.md (#437) 2023-02-19 09:27:56 +01:00
gendx
ace97aaeb2
Fix typo in basic-syntax/variables.md. (#339) 2023-02-03 15:30:44 +00:00
Marko Zagar
10ca7b1b2d
More fixes and additions to Day1 Morning (#269)
* Corrections around slices and string slices, also slight improvements to the language.

* Explained some of the confusing details in the functions example.

* Added a speaker note (hinting at `Into`  as a complement to generics).

* Exclude the clarification code snippet from build testing.

* Update functions-interlude.md

Do not mention explicit section numbers as they may change.
2023-01-24 15:20:18 +01:00
Igor Petruk
6702accbbb
Update string-slices.md (#209)
* Update string-slices.md

* Adding an extra example of converting `String` back to `&str`.
* C++ who would often read this guide could get immediate intuitive understanding of Rust strings if you compare them to C++ equivalents.

* Expand on `String` vs `std::string`

Co-authored-by: Martin Geisler <martin@geisler.net>
2023-01-24 08:52:55 +00:00
Igor Petruk
fe8fa8d232
Update Speaker Notes for slices.md (#208)
It makes sense to add a speaker note about the question asked.
2023-01-23 21:23:41 +01:00
Igor Petruk
49c9ba692e
Update static-and-const.md (#215)
Let's not use the word "lifetime" just yet. It is arguably the heaviest topic in Rust and it was not yet introduced.
2023-01-23 17:15:54 +01:00
Igor Petruk
d1588e4f2f
Update scopes-shadowing.md (#216)
Adding the definition of what shadowing is and how it is different from mutation.
2023-01-23 11:38:11 +00:00
Igor Petruk
8c58253217
Update the Speaker Notes of the type-inference.md (#214)
* Update the Speaker Notes of the type-inference.md

I think this is one of the critical moments in understanding Rust. This behavior is different from many static and dynamic programming languages.

* Fix typo

Co-authored-by: Andrew Walbran <qwandor@google.com>
2023-01-23 11:05:46 +00:00
Igor Petruk
4760295030
Update Speaker Notes for compound-types.md (#207)
It could be a "gotcha" moment for readers when they associate `()` with `void` from, say, C++.
2023-01-23 11:04:38 +00:00
Robin Stringer
2d4340f3eb
Speaker notes for 6.5 Functions
Adds speaker notes covering functions basics (declaration parameters, return values, the 'unit' type.
2023-01-19 12:16:43 +00:00
Marko Zagar
6bda89f34e Clarification on references 2023-01-19 10:51:35 +00:00
Marko Zagar
529d4bf20c Speaker note tweaks for compound types 2023-01-19 10:51:35 +00:00
Robin Stringer
47435cbf41
Adds speaker notes for 6.4.1. String vs str
Adds speaker notes including:
-Brief explanation of &str, String type
-String::from and String::new
-push_str method
2023-01-13 13:14:19 +00:00
Martin Geisler
67b65c5ee8
Simplify language in speaker notes 2023-01-12 17:13:46 +01:00
Robin Stringer
d85643d5ac
Update src/basic-syntax/slices.md
Co-authored-by: Martin Geisler <martin@geisler.net>
2023-01-12 16:11:46 +00:00
Robin Stringer
f4b651456c
Speaker notes to 6.4 Slices
Brief digest of the slice type, including mentions of borrowing, range syntax and lifetimes.
2023-01-12 15:53:16 +00:00
Fabian Bornhofen
3dd03bbd65 Re-add link that is still in use 2023-01-12 12:33:03 +01:00
Fabian Bornhofen
a3ec024fba Fix formatting in compound-types.md 2023-01-12 11:26:48 +01:00
Martin Geisler
d037d7b5c7
Merge pull request #133 from rastringer/patch-1
Adds speaker notes to Compound Types section
2023-01-11 15:51:53 +01:00
Martin Geisler
b6bec18875
Clarify that "fixed" means "compile-time constant" 2023-01-11 15:49:10 +01:00
Robin Stringer
41bb8acf3f
Removes out of bounds checks for simplicity
Removes the out of bounds checks to keep the notes simple.
2023-01-11 14:35:20 +00:00
Martin Geisler
587645db6c
Clarify default vs debug output. 2023-01-11 10:49:21 +01:00
Martin Geisler
1b3eaec5e7
Merge pull request #141 from brandonpollack23/static_const
Added notes, runtime constant eval, and footnoes to static-and-const.md
2023-01-10 18:53:46 +01:00
Martin Geisler
0d5232358b
Remove dangling footnote 2023-01-10 18:52:37 +01:00
Martin Geisler
c994340a8f
Merge pull request #142 from fbornhofen/speaker-notes-fbornhofen
Add example for underscore syntax with generics (type-inference.md)
2023-01-10 17:46:20 +01:00
Brandon Pollack
8dc2ea4503 Remove superfluous distracting info 2023-01-10 22:12:43 +09:00
Brandon Pollack
b5a7c9cdcc
clarify static details
Co-authored-by: Martin Geisler <mgeisler@google.com>
2023-01-10 05:05:45 -08:00
Brandon Pollack
a532c23c60
Simplify wording of constexpr/const relation
Co-authored-by: Martin Geisler <mgeisler@google.com>
2023-01-10 05:05:26 -08:00
Fabian Bornhofen
d1a3290cd6 Add reference to collect, FromIterator 2023-01-10 11:40:02 +01:00
Fabian Bornhofen
b1069f863c Add example for underscore syntax with generics (type-inference.md) 2023-01-10 11:30:48 +01:00
Martin Geisler
e43dec24fd
Tighten language 2023-01-10 09:29:57 +01:00
Brandon Pollack
89ddb2c197 Added notes, runtime constant eval, and footnoes to static-and-const.md 2023-01-10 13:41:31 +09:00
Brandon Pollack
d15a653ed8 Added some speaker notes to variables.md 2023-01-10 13:27:39 +09:00
Martin Geisler
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
Fabian Bornhofen
77d3ac01e7 Add speaker notes for scopes-shadowing.md 2023-01-09 17:21:54 +01:00
Fabian Bornhofen
ba09385c4a Add bullet point about mutable references 2023-01-09 16:54:14 +01:00
Robin Stringer
6fac027dd6
Updates PR with code formatting
Backticks for inline and single line code blocks / examples.
2023-01-09 14:42:27 +00:00
Robin Stringer
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
Andrew Walbran
28942d7b9f
Merge pull request #36 from daym/patch-1
Tuples with "..." make no sense, so don't use them
2023-01-04 15:42:35 +00:00
MaschitaG
b2ae19b5fd
Update static-and-const.md 2023-01-02 10:25:39 +01:00
Martin Geisler
6851a6b533
Show different tuple sizes 2022-12-28 15:41:08 +01:00
Janosh Riebesell
cf695a99e3
fix casing in type bit widths 2022-12-26 19:35:09 -08:00
drgnchan
73e9a0b854
Update references-dangling.md 2022-12-23 15:41:41 +08:00
Danny Milosavljevic
4126cbd519
Tuples with "..." make no sense, so don't use them 2022-12-22 20:25:15 +01:00
Martin Geisler
121a7d33f3
Merge pull request #7 from andrewpollack/patch-5
Minor punctuation update
2022-12-22 10:08:16 +01:00
Martin Geisler
0e74800885
Merge pull request #9 from andrewpollack/patch-7
Minor punctuation addition
2022-12-22 10:07:58 +01:00