Commit Graph

95 Commits

Author SHA1 Message Date
Gianluca Recchia
249a154e81
Improve wording and fix typo (#242) 2021-02-28 23:46:55 +01:00
simonsan
606bcffa44
Structural changes to patterns subfolder (#219) 2021-02-25 20:56:37 +01:00
Michael Bryan
96fa89b923
Revise the FFI chapters (#190)
Co-authored-by: Marco Ieni <11428655+MarcoIeni@users.noreply.github.com>
2021-02-24 22:49:30 +01:00
shorii
dd265b1ec1
Fix typo ('indrection' to 'indirection') (#218) 2021-02-21 07:29:54 +01:00
follower
4d78ffd3c3
Typo: Fix missing space between words. (#217) 2021-02-10 12:06:10 +01:00
simonsan
2cd70a552d
Shorten lines to line-length 80 (#208) 2021-01-22 00:00:02 +01:00
Cassandra McCarthy
9c33b27658
Use more inclusive language in some parts (#203) 2021-01-15 22:44:03 +01:00
vent
f78e3e3166
Talk about mem::take instead of mem::replace (#200)
* Talk about std::take instead of std::replace

* Mention mem::replace in mem::take idiom

* Fix example code so it can compile and execute

* Clarify the need for Default in disadvantages

* Update idioms/mem-take.md

* Add note tag to section on mem::replace

Co-authored-by: simonsan <14062932+simonsan@users.noreply.github.com>

* Follow on from previous paragraph in mem::take

* Change title to include mem::take

Co-authored-by: simonsan <14062932+simonsan@users.noreply.github.com>
2021-01-13 23:08:00 +01:00
Ped
264cddf06e
Fix typo ("desctructors" to "destructors") (#195) 2021-01-09 18:49:11 +01:00
Ped
22e8405b26
Fix typo ("anways" to "anyways") (#193) 2021-01-09 14:42:15 +01:00
simonsan
f61f2f40f0
Fix lines to 150 line length for better tracking of future changes (#189) 2021-01-08 08:59:46 +01:00
Andreas Schmidt
a0e765179d
Add note on #[non_exhaustive] for enums (#168)
Co-authored-by: Marco Ieni <11428655+MarcoIeni@users.noreply.github.com>
2021-01-06 15:18:34 +01:00
Marco Ieni
76ae5bd896
Reduce long lines (#176) 2021-01-06 14:58:26 +01:00
Marco Ieni
5fedf5aa29
Markdownlint: Do not allow tabs in code blocks (#178) 2021-01-06 14:55:55 +01:00
jhwgh1968
11a4b712c0
Several FFI Sections: Strings, Errors, and API Design (#106) 2021-01-05 16:44:31 +01:00
Weipin Xia
501ae92a43
Fix missing argument in rustdoc-init.md (#166) 2021-01-05 16:02:16 +01:00
Takashi Idobe
60946dd8c7
Add markdownlint to CI (#164) 2021-01-05 15:57:07 +01:00
Takashi Idobe
5f1425d7ed
Apply markdownlint to project (#163) 2021-01-05 15:36:20 +01:00
Christopher
c2321270fa
Use coercion for arguments (#29)
Describe some of the reasons it is considered idiomatic to use `&str` over `&String` in most cases.


Co-authored-by: Marco Ieni <11428655+MarcoIeni@users.noreply.github.com>
Co-authored-by: Chris Wong <lambda.fairy@gmail.com>
Co-authored-by: simonsan <14062932+simonsan@users.noreply.github.com>
Co-authored-by: Ivan Tham <pickfire@riseup.net>
2021-01-04 09:31:55 +01:00
join3r
1a65aadb31
Fix Spelling mistake (#157) 2021-01-04 05:54:27 +01:00
Marco Ieni
344b5b8fbd
Fix internal links (#143)
* Rename Readme to index to fix internal book links

Co-authored-by: simonsan <14062932+simonsan@users.noreply.github.com>
2021-01-03 10:43:49 +01:00
Riley Shea
4017a73d62
Fix default idiom example (#134)
Before this change, the example code doesn't run on the current rust stable release(1.49).
This is because `Path` inherently has a u8 that requires the sized trait which requires either statics or replacing Path with PathBuf.

After this change, the example code will run "as-is" without warnings or errors.
2021-01-03 08:44:31 +01:00
Ovidiu Curcan
e333d15258
Fix on-stack dispatch example (#137)
A `char` can't be used as a path. You already use the correct `"-"` in the "Disadvantages" example.
Remove `ignore` for the example block
2021-01-03 08:39:53 +01:00
Marco Ieni
cae562b311
Remove incomplete phrase (#138) 2021-01-03 03:26:01 +01:00
simonsan
b6e5414941
Add doc tests to CI (#124)
* rename baz() into main() and vice versa where applicable

Fixes #49
2021-01-02 12:40:52 +01:00
simonsan
de7519f5d9
Add introductions (#117)
Co-authored-by: Marco Ieni <11428655+MarcoIeni@users.noreply.github.com>
2021-01-02 12:15:33 +01:00
simonsan
3f3ae4ae73
Adding mdbook configuration and deployment to gh-pages (#111) 2021-01-01 12:27:42 +01:00
Richard Walters
1d606a5116
Fix broken links (#105)
* Fix broken links

Fix broken link from `on-stack-dyn-dispatch.md` to `dtor-finally.md`.
Link to `RAII.md` was broken as well.
2020-12-31 12:41:09 +01:00
Sergey Kiselev
8b3cd45d9e Fix typos 2020-08-10 11:57:37 +03:00
Tom Kaitchuck
9a9245cad8
Update rustdoc-init.md
Add comment per feedback
2020-07-26 23:54:23 -07:00
Tom Kaitchuck
7e416d0c99
Update idioms/rustdoc-init.md
Co-authored-by: Ivan Tham <pickfire@riseup.net>
2020-07-26 23:47:06 -07:00
Tom Kaitchuck
1e62aa59f8
Update idioms/rustdoc-init.md
Co-authored-by: Ivan Tham <pickfire@riseup.net>
2020-07-26 23:46:08 -07:00
Tom Kaitchuck
c642018eee
Update idioms/rustdoc-init.md
Co-authored-by: Ivan Tham <pickfire@riseup.net>
2020-07-26 23:45:59 -07:00
Tom Kaitchuck
2dcf58a049
Update idioms/rustdoc-init.md
Co-authored-by: Ivan Tham <pickfire@riseup.net>
2020-07-26 23:45:17 -07:00
Tom Kaitchuck
f62a79db7f
Update idioms/rustdoc-init.md
Co-authored-by: Ivan Tham <pickfire@riseup.net>
2020-07-26 23:44:33 -07:00
Tom Kaitchuck
625b5017da
Update idioms/rustdoc-init.md
Co-authored-by: Ivan Tham <pickfire@riseup.net>
2020-07-26 23:44:24 -07:00
Tom Kaitchuck
f2e471027a
Update idioms/rustdoc-init.md
Co-authored-by: Ivan Tham <pickfire@riseup.net>
2020-07-26 23:44:14 -07:00
Tom Kaitchuck
2a4eaff0db
Update idioms/rustdoc-init.md
Co-authored-by: Ivan Tham <pickfire@riseup.net>
2020-07-26 23:44:06 -07:00
Tom Kaitchuck
1571a7ae19
Update idioms/rustdoc-init.md
Co-authored-by: Ivan Tham <pickfire@riseup.net>
2020-07-26 23:43:59 -07:00
Tom Kaitchuck
a2988fe94e
Update idioms/rustdoc-init.md
Co-authored-by: Ivan Tham <pickfire@riseup.net>
2020-07-26 23:43:51 -07:00
Tom Kaitchuck
1761b3b5ce
Update idioms/rustdoc-init.md
Co-authored-by: Ivan Tham <pickfire@riseup.net>
2020-07-26 23:43:40 -07:00
Tom Kaitchuck
2a44fbdb55
Update idioms/rustdoc-init.md
Co-authored-by: Ivan Tham <pickfire@riseup.net>
2020-07-26 23:43:02 -07:00
Tom Kaitchuck
46493aa6c1
Update idioms/rustdoc-init.md
Co-authored-by: Ivan Tham <pickfire@riseup.net>
2020-07-26 23:42:49 -07:00
Tom Kaitchuck
87245c7d17
Update idioms/rustdoc-init.md
Co-authored-by: Ivan Tham <pickfire@riseup.net>
2020-07-26 23:42:36 -07:00
Tom Kaitchuck
faacbbcf7a Make example more explicet 2020-07-23 13:31:54 -07:00
Tom Kaitchuck
5310b14b62 Add example for #91 2020-07-16 23:19:34 -07:00
Andre Bogus
399c38ee2b New idiom: Out of the Box Dynamic Dispatch 2020-07-15 00:28:08 +02:00
kellerkindt
5ebfc0cdc5
Show call of default() 2020-03-05 11:28:58 +01:00
Kinsey Favre
396ae01fdd
Rewrite mentions of try! macro to use ? operator
The `try!` macro has been [deprecated since Rust 1.39.0][1] in favor of
the `?` operator; update text using it to reflect this.

[1]: https://doc.rust-lang.org/std/macro.try.html
2020-02-06 16:56:39 -06:00
Chris Wong
a1a570cb55
Merge pull request #81 from kriomant/temporary-mutability
Temporary mutability idiom
2019-04-29 18:38:09 +12:00