diwic
5f484ad473
Change "".to_string() to String::new()
...
I mistakenly lost this change in my previous pull request, sorry!
8 years ago
Chris Wong
9d955043a4
Merge pull request #33 from partim/take-for-replace
...
Mention Option::take() as an alternative to mem::replace()
8 years ago
Martin Hoffmann
9fd6a8f9cf
Fix language.
8 years ago
David Henningsson
3bec875bdc
Merge remote-tracking branch 'dd/patch-1'
...
Conflicts:
idioms/mem-replace.md
8 years ago
Nick Cameron
e5c792eb69
Merge pull request #37 from hoodie/master
...
fixed highlighting
8 years ago
Hendrik Sollich
41fa4d556a
fixed highlighting
8 years ago
Chris Wong
26e27cd307
Merge pull request #32 from xfix/patch-1
...
Prepending _ to field name avoids unused field warning
8 years ago
Nick Cameron
283e410d0b
Merge pull request #34 from CasualX/master
...
Fix a few nits.
8 years ago
diwic
490fb34bb2
Improve mem-replace example
...
Submitting a PR as suggested by llogiq [here](https://www.reddit.com/r/rust/comments/56l2pk/an_underused_idiom_memreplace_to_avoid_clones/d8kksx6 )
8 years ago
CasualX
69de2351f2
Fix a few nits with the replace idiom.
...
Change the match guard to be part of the pattern.
Change `"".to_string()` to a more idiomatic `String::new()` to create a new `String` without memory allocation.
8 years ago
Martin Hoffmann
618a65c337
Mention Option::take() as an alternative to mem::replace()
8 years ago
Konrad Borowski
6af4003b88
Prepending _ to field name avoids unused field warning
8 years ago
Christopher
9b289ac6fc
Merge pull request #31 from llogiq/mem-replace
...
new idiom: mem::replace
8 years ago
Andre Bogus
547ff18605
Adressed comments
8 years ago
Andre Bogus
31b282ad9f
new idiom: mem::replace
8 years ago
Chris Wong
8a94ebc253
Replace "png" with "num_cpus"
8 years ago
Nick Cameron
3d748b1adc
Merge pull request #25 from lfairy/option-list
...
Add "Treating Option like a list"
8 years ago
Chris Wong
f3fe2d6f28
Iterating over an Option
8 years ago
Chris Wong
a65d22ddc2
Direct contributors to the issue tracker
8 years ago
Mikhail Trishchenkov
1bc8a36a2f
Small title fix
8 years ago
Mikhail Trishchenkov
67685cddf0
Rename idiom
8 years ago
Mikhail Trishchenkov
9f85aad151
Fix review issues
...
Replace tabs with spaces, mention usage for borrowing, add disadvantage
(code indentation increase).
8 years ago
Mikhail Trishchenkov
72606ccfcb
Clone to closure idiom
8 years ago
Chris Wong
f4ae13a81e
Small crates
8 years ago
Nick Cameron
f41b745acf
Add the badly-named fold pattern
9 years ago
Nick Cameron
99b1342338
Visitor pattern
9 years ago
Nick Cameron
6ac851e718
Add the extensibility by privacy pattern
...
(And change the concatenation pattern to say something different about perf)
9 years ago
Nick Cameron
e708788268
Merge pull request #2 from nrc/structs
...
Composing structs
9 years ago
Nick Cameron
e340602f3f
Composing structs
9 years ago
Nick Cameron
fd47bf3ba8
Merge pull request #18 from nrc/deref
...
Deref polymorphism anti-pattern
9 years ago
Nick Cameron
c2cf5e6c1a
Deref polymorphism anti-pattern
9 years ago
Nick Cameron
a06ca32e70
Merge pull request #15 from liigo/patch-3
...
improve comment
9 years ago
Nick Cameron
e54514d35d
Merge pull request #13 from liigo/patch-1
...
fix compile error in comment
9 years ago
liigo
d4fa321a38
improve comment
9 years ago
liigo
ea3aa4d310
fix compile error in comment
9 years ago
Nick Cameron
8a461ce5f6
Merge pull request #16 from oli-obk/patch-1
...
Result + try! is a pattern, unwrap() is not
9 years ago
Nick Cameron
d18cb4bd7e
Merge pull request #14 from liigo/patch-2
...
improve comments
9 years ago
Oliver Schneider
d4f297e1d3
Result + try! is a pattern, unwrap() is not
9 years ago
Nick Cameron
11f2875a3b
Merge pull request #12 from jsanders/patch-1
...
Fix typo in `.with_attribute` call.
9 years ago
Liigo Zhuang
0bdd88a94a
improve comments
9 years ago
James Sanders
73c74caf14
Fix typo in `.with_attribute` call.
9 years ago
Nick Cameron
c638139abf
Merge pull request #9 from aochagavia/patch-1
...
Fix typo
9 years ago
Nick Cameron
bb4cc1bfbd
Merge pull request #10 from stevegury/patch-1
...
Fix a minor typo s/he/the/
9 years ago
Steve Gury
5bc7f3a99c
Fix a minor typo s/he/the/
9 years ago
Adolfo Ochagavía
fed94154f3
Fix typo
9 years ago
Nick Cameron
ea2165eaf7
Merge pull request #7 from fphilipe/patch-1
...
Add syntax highlighting
9 years ago
Philipe Fatio
7a83bd7037
Add syntax highlighting
9 years ago
Nick Cameron
0d011bf108
Merge pull request #3 from MattWis/patch-1
...
Fix RAII Guards
9 years ago
Matt Wismer
244aedbfae
Fix RAII Guards
...
Make "RAII" uppercase so that the link can be followed
9 years ago
Nick Cameron
325b642a01
Added a few idioms and patterns - some are still WIP
9 years ago