486 Commits (master)

Author SHA1 Message Date
Sudo Nice 644fc963af Tune spaces and indentation 4 years ago
Sudo Nice cea0927fcb Add missed comma 4 years ago
Sudo Nice 6877da3f6e Wrap code with backticks 4 years ago
Sudo Nice dbebf8d315 Remove duplicate word 4 years ago
Nicolas Rolland 6e3734d562
Update README.md
typo
4 years ago
Max Block c8b771c40f
a typo 4 years ago
RXDA 196e06ed96
fix: named loop example print 4 years ago
frbimo c67994c50d minor fix deref_and_derefmut 4 years ago
Dhghomon 002d58311d
Merge pull request #69 from chapeupreto/patch-1
fix typo
4 years ago
Li Hongzhang 6dcb1cf60c fix typo: about is -> is about 4 years ago
Rod Elias 9e6d3d368a
fix typo 4 years ago
Nikita Tolkachev ae9b9cbf60
declarative -> imperative
"non-functional style" can be declarative, but the given example is clearly imperative.
4 years ago
Dhghomon 165a6d95e3
Update intro 4 years ago
Dhghomon fdcdaf7fdb
Rewrite - final part 4 years ago
Dhghomon 6b817fecb6
Rewrite up to taking user input 4 years ago
Dhghomon 66d44537a9
Rewrite macros 4 years ago
Dhghomon ec62716372
Rewrite tour of std 4 years ago
Dhghomon c6db10d287
Rewrite up to char part of tour 4 years ago
Dhghomon 5e7a976ab7
Rewrite testing 4 years ago
Dhghomon 8bde2c5846
Rewrite mods 4 years ago
Dhghomon 8600614ae8
rewrite deref 4 years ago
Dhghomon 69538733ce
Rewrite builder pattern 4 years ago
Dhghomon 6994df45e9
Rewrite Box 4 years ago
Dhghomon a00d3f1c99
Rewrite attributes 4 years ago
Dhghomon fe3d0ea302
Rewrite channels 4 years ago
Leon G 54ba620778
Fix swapped enum name mistake
ok() converts Result to Option and not the other way around
4 years ago
Dhghomon 465fdb0e33
Rewrite Arc 4 years ago
Dhghomon ceb3c76ddd
Rewrite closures in functions 4 years ago
Dhghomon 344f622915
Rewrite multiple threads 4 years ago
Dhghomon 3c276e9236
Rewrite Rc 4 years ago
Dhghomon 81530b2cb4
Rewrite importing inside functions 4 years ago
Dhghomon 28448693d7
Rewrite interior mutability 4 years ago
Dhghomon 721854f192
Rewrite lifetimes 4 years ago
Dhghomon c18cd96bc7
Rewrite dbg! 4 years ago
Dhghomon e6f69ffe0c
Rewrite helpful methods 4 years ago
Dhghomon 65dee10bc4
More rewriting helpful methods 4 years ago
Dhghomon 71b33ecedb
Rewrite helpful methods 4 years ago
Dhghomon 1ffc25eb41
Rewrite closures 4 years ago
Dhghomon ee71a19d2b
Rewrite iterators 4 years ago
Dhghomon 7b4ca8a197
Start rewrite of Iterator 4 years ago
Dhghomon a2671fa53a
Rewrite chaining methods 4 years ago
Dhghomon 0843f8953b
Rewrite From trait 4 years ago
Dhghomon 346c44e3a9
Start trait rewrite 4 years ago
Dhghomon 00e88ecc8b
Rewrite unwrap 4 years ago
Dhghomon 8a44bc8d12
Rewrite question mark operator 4 years ago
Dhghomon d6328567fa
Rewrite VecDeque 4 years ago
Dhghomon 8310de02fb
Rewrite Result 4 years ago
Dhghomon c2ebfbf145
Rewrite Option 4 years ago
Dhghomon 141dc7c970
Rewrite generics 4 years ago
Dhghomon 7a32cb8f84
reorder collections + rewrite BinaryHeap 4 years ago
Dhghomon 193003bd72
Rewrite HashSet 4 years ago
Dhghomon b04b935fb1
Rewrite HashMap 4 years ago
Dhghomon 0e05b6e32b
Rewrite implementing structs and enums 4 years ago
Dhghomon 9602460d0f
Rewrite loops 4 years ago
Dhghomon d868d9130c
Rewrite destructuring + move down 4 years ago
Dhghomon c2d82206bf
Rewrite dot operator + move down 4 years ago
Dhghomon d7c5afabaa
Rewrite enums 4 years ago
Dhghomon 91a7e20df1
Rewrite structs 4 years ago
Dhghomon 716aa42b46
Rewrite control flow 4 years ago
Dhghomon 7a52cdbc09
Rewrite tuples 4 years ago
Dhghomon 9486909565
Rewrite vectors 4 years ago
Dhghomon b84dfe615b
Rewrite arrays 4 years ago
Dhghomon 6b3382a81d
Rewrite variables without values 4 years ago
Dhghomon e97165471e
Rewrite copy types 4 years ago
Dhghomon be8d06bf93
Rewrite giving references to functions 4 years ago
Dhghomon afecb3b718
Rewrite shadowing again 4 years ago
Dhghomon 7d589e0b4b
rewrite up to mutable references 4 years ago
Dhghomon e3a8d24dd6
Rewrite Strings 4 years ago
Dhghomon 21e1319b15
Rewrite up to printing 4 years ago
Dhghomon c1a3ee3edf
Rewrite up to stack, etc. 4 years ago
Dhghomon 6ef862542e
Rewrite up to shadowing 4 years ago
Dhghomon 880fec1858
Rewrite up to mutability 4 years ago
Dhghomon f078191f14
Rewrite up to declaring variables 4 years ago
Dhghomon a365bcd7e2
Rewrite up to type inference 4 years ago
Dhghomon 4bf9a4c60b
More rewriting 4 years ago
Dhghomon 20fbd27db4
start rephrasing and simpler English 4 years ago
Dhghomon fe96ca0ba8
more on traits 4 years ago
Dhghomon 799cce95d5
Begin the end 4 years ago
Dhghomon ff88b06b65
eprintln! note 4 years ago
Dhghomon 115f959def
+ writing macros 4 years ago
Dhghomon ad5a53be40
writing macros 4 years ago
Dhghomon fdf5972936
cargo doc 4 years ago
Dhghomon ade883ec4e
ToString from Display 4 years ago
Dhghomon f22de35198
change to write! macro 4 years ago
Dhghomon 41a0ca92b9
env! 4 years ago
Dhghomon 084503deda
Vars 4 years ago
Dhghomon e4b44ec476
Taking user input 4 years ago
Dhghomon e718530e15
typo 4 years ago
Dhghomon 56a2cee61e
start cargo 4 years ago
Arcadie 5c96293e48 Fix minor typos and code snippet comments 4 years ago
Dhghomon b00cebb255
OpenOptions 4 years ago
Dhghomon ab504724d3
Merge pull request #64 from Arcadie/fix-snippets
Fix a couple of snippets; snippets-test - don't exit early.
4 years ago
Dhghomon 5d3f058621
update 4 years ago
Dhghomon def10f5479
typo 4 years ago
Dhghomon dbc5ca1f57
Start files 4 years ago
Dhghomon 511e37cde5
extern crate 4 years ago
Dhghomon b16f747f7a
cfg! 4 years ago
Dhghomon 759739d8e8
line!(), etc. 4 years ago
Dhghomon 5224e4a996
unreachable!() 4 years ago
Dhghomon 30605bbe5a
std tour: time 4 years ago
Dhghomon d221daa8b6
std prelude 4 years ago
Dhghomon 6dc635eeee
matches_indices, peekable 4 years ago
Arcadie 58e0646d16 Fix a couple of snippets; makefile - don't exit early. 4 years ago
Arcadie 824773a26a Integers: fix ops typo; Floats: tweak .round explanation 4 years ago
Dhghomon 38e3c217c8
char_indices() 4 years ago
Dhghomon cddd62c53b
Add some more operators 4 years ago
Dhghomon f0ae9256ab
Merge pull request #62 from Arcadie/patch-osstring
OsString: calling unwrap will panic, use match instead
4 years ago
Dhghomon 1863d76560
typo 4 years ago
Dhghomon 6d891663ba
more on std::mem::take 4 years ago
Dhghomon 280377b63a
tour: mem 4 years ago
Arcadie c021f2ceb0 OsString: calling unwrap will panic, use match instead 4 years ago
hal ef4121a934 Fix typos 4 years ago
Jens Kohl 6389171068
Small typo in introduction 4 years ago
Dhghomon 424c34faa4
std tour - String, OsString, CString 4 years ago
Rod Elias e2e1fc2874
minor improvements 4 years ago
Dhghomon 0147b79340
more on enums 4 years ago
Dhghomon e24c86028b
std library tour: bool, Vec 4 years ago
Dhghomon 02b96f6319
std tour: floats 4 years ago
Dhghomon 8b597e6104
Update README.md 4 years ago
Dhghomon 4e82ed569d
format a bit 4 years ago
Dhghomon c3530f7bda
Start tour of standard library 4 years ago
Dhghomon 02ecbea019
Merge pull request #58 from szTheory/patch-4
Fix other instance of city name in example
4 years ago
Dhghomon d8510d0a19
Merge pull request #57 from szTheory/patch-3
Fix city name in example
4 years ago
Dhghomon 0b66069a8c
introduce preludes 4 years ago
Dhghomon 1a2b5ded95
+ chunks, windows 4 years ago
szTheory 70f790ccca
Fix other instance of city name in example 4 years ago
szTheory 2b38de17cc
Fix city name in example 4 years ago
Dhghomon 4cef9ad9af
Parts 1 + 2 4 years ago
Dhghomon c59a16831e
+ comments 4 years ago
Dhghomon 74fa340cf2
TOC 4 years ago
Dhghomon 6e23b8c08d
+ rayon 4 years ago
Dhghomon 72c9e08cf7
Add note 4 years ago
Dhghomon f48a6cc5b1
Start external crates 4 years ago
Dhghomon dd063356d0
Merge pull request #56 from kemra102/master
Fix typo
4 years ago
Dhghomon c14761f3fc
Merge pull request #55 from szTheory/patch-2
Fix in-line code sample backtick formatting
4 years ago
Danny f4261209d2
Fix typo
Fix typo in destructuring section, moving a stray backtick to the correct location.
4 years ago
szTheory a7c1f86b45
Fix in-line code sample backtick formatting 4 years ago
szTheory 7943c4da48
Fix typo 4 years ago
Arcadie 95ed85511f Typo fixes: attributes, derive, deref and testing.
attributes - remove list tag from first example, not used for the others;
derive - String does not implement Copy;
deref - small typo, remove extra dot from .main();
testing - use two backticks to escape backticks used in code block, explicitly use assert!(left, right) for the description, add missing quote in last example;
4 years ago
Dhghomon 1891f1311e
More on testing, etc. 4 years ago
Sebastian c74e1adeee
Incorrect formatting of `print_one_thing` method
This caused the whole sentence to be highlighted instead the function name.
4 years ago
Dhghomon 4616e62a07
Merge pull request #49 from chapeupreto/patch-2
fix typo
4 years ago
Rod Elias 8046f872ae
fix typo 4 years ago
Rod Elias e058c79219
fix output for "Printing 'hello, world!'" example 4 years ago
Dhghomon fa41a486c7
Start testing 4 years ago
Dhghomon 48c9fbd7a0
Clarify after pickfire's PR re: reach 4 years ago
Dhghomon 8f7bfceaa3
Comment on Box 4 years ago
Dhghomon f147aef4f7
Update status 4 years ago
Dhghomon 87f0f76333
super 4 years ago
Dhghomon 0fd4fdde56
Start crates and modules 4 years ago
Dhghomon 961e71f081
Deref and DerefMut 4 years ago
Dhghomon 984002eec4
+ fold 4 years ago
Dhghomon 56556d1531
Bit more on .expect() 4 years ago
Dhghomon a4d7fb6367
br print result 4 years ago
Dhghomon f1614b868f
add br 4 years ago
Dhghomon 9c18d8361f
TOC 4 years ago
Dhghomon c0cf28ba3b
Box around traits 4 years ago
Akshat Agarwal 4f438f8d7c
fix small typo 4 years ago
Dhghomon 5ac4d3a2c0
Attributes section 4 years ago
Dhghomon 744d910a47
Rewrite snippet part, bit on attributes 4 years ago
Dhghomon 898784fc32
Some more closure explanation 4 years ago
Dhghomon e09e309f06
Merge pull request #42 from elfsternberg/L7104-type-correction
This block describes the typing incorrectly.
4 years ago
Dhghomon 38ac7cceef
Merge pull request #41 from patahene/patch-1
Fix an example output
4 years ago
Dhghomon c01835408a
Merge pull request #40 from Zyfarok/master
Fix shadowing example
4 years ago
Elf M. Sternberg e654c7d8e5 This block is confused.
Consider the following demonstration (this code compiles under Rust 2018
as a drop in for the contents of main.rs after `cargo new mapdemo --bin;
cargo run`):

```
fn main() {
	let x = [1, 2, 3, 4, 5];
	let z = x.iter().map(|&x| format!("{}", x)).collect::<Vec<String>>();
	println!("{:?}", z);
}
```

The `self` argument to map will be an `Iter<u64>`.  The `Self::Item`
type is therefore `u64`.  The return type of the function being passed
to map is `String`.  This is what the `B` type variable indicates: the
return type of the function, as can be clearly seen in the second line
of the `where` clause in your example:

```
    F: FnMut(Self::Item) -> B
```
4 years ago
patahene f592f662e4
Update README.md 4 years ago
Zyf 3b8d5057d6
Fix shadowing example 4 years ago
Arcadie 583281f2d5 Use emojis to ignore snippets that won't compile / code fragments.
I did a search and replace for:

// (note: this will not compile) incomplete code snippet -> // ⚠️
// (note: this will not compile) -> // 🚧

Note: Requires md2src version 1.1.0 or later!
4 years ago
Dhghomon cddf839e32
Default + builder pattern 4 years ago
Arcadie 192047be94 Delete whitespace, tweak phrasing 4 years ago
Arcadie 9e9bf0a265 Arc: when spanwing threads in a loop, call join on handlers at the end 4 years ago
Arcadie 27def910d6 Mutex: fix output for code samples 4 years ago
Arcadie a1f511f80f Generics - fix print with, specify variables of type U 4 years ago
Arcadie c56888fcf5 VecDeque - say items are moved instead of copied on remove() 4 years ago
Dhghomon 0dc4a75139
chars, len(), chars().count() 4 years ago
Arcadie e773c679bd Impl Trait - make snippets compile by fixing ignore message 4 years ago
Arcadie 3263dce437 Fix small typo in filter_map() example, get rid of into_iter() for range.
Range already implements Iterator trait, so no need for the into_iter().
4 years ago
Dhghomon fafdb36cec
Rewrite a bit 4 years ago
Dhghomon 613a9755f0
impl Trait 4 years ago
Dhghomon 36a056df85
Closures in functions 4 years ago
Dhghomon 8fb5b1e131
Explanation of what a snippet is 4 years ago
Alexander Willner 8c0d7a3b79 getting all code snippets to compile or to be skipped 4 years ago
Alexander Willner 27f0d7ad45 getting the first 50 code snippets to compile or to be skipped 4 years ago
Alexander Willner 6f0ed2ae75 Started to get snippets compile / mark them as uncompilable... 4 years ago
Alexander Willner 1cf4605343 Mark snippet as no compilable 4 years ago
Dhghomon a39f09850a
Some other methods 4 years ago
Dhghomon 56afb860af
.cycle() 4 years ago
Dhghomon 33705b94ba
.find(), .position() 4 years ago
Dhghomon b62700abae
.any(), .all() 4 years ago
Dhghomon ef187d51ba
.and_then(), .and() 4 years ago
Dhghomon e9fdd53a7e
ok_or + ok_or_else 4 years ago
Dhghomon 4ac9f67713
Fix typo 4 years ago
Dhghomon c4cb3c1ac1
More on closures + iterators 4 years ago
Dhghomon 516556fb5f
VecDeque 4 years ago
Dhghomon 9f9c7484c7
BinaryHeap 4 years ago
Dhghomon e7f9b6d27c
Start HashSet + BTreeSet 4 years ago
Suresh G e2ffd92ff1
Update README.md
spell changes
4 years ago
Dhghomon 17a9c09880
[] vs. .get() for HashMap 4 years ago
Dhghomon 6ccb798ce3
More on hashmaps 4 years ago
byschii 1f59c6b710
Typo 4 years ago