221 Commits (f1614b868fdf7b8d97a52050ee68ec1ef0e88075)
 

Author SHA1 Message Date
Dhghomon f1614b868f
add br 4 years ago
Dhghomon 9c18d8361f
TOC 4 years ago
Dhghomon c0cf28ba3b
Box around traits 4 years ago
Dhghomon b86d019b42
Merge pull request #46 from humancalico/patch-1
fix small typo
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
Dhghomon 5275f9793a
Merge pull request #39 from Arcadie/feat-snippets-improvements
Use different emojis to ignore snippets that won't compile / code fragments.
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 fbe3651fc4 Include comments in ignore string as well 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
Dhghomon ba977ad4d9
Merge pull request #37 from AlexanderWillner/master
give a hint on how to install required binaries for the book
4 years ago
Alexander Willner a6d30d3c99 open the book automatically 4 years ago
Alexander Willner 752141bb2a make 'make book' phony 4 years ago
Alexander Willner 056ecf91a0 ignore book folder 4 years ago
Alexander Willner 75da2fd150 give a hint on how to install required binaries for the book 4 years ago
Alexander Willner f690d2b378 Merge branch 'master' of https://github.com/Dhghomon/easy_rust 4 years ago
Dhghomon 8ba4e03e1c
Merge pull request #36 from Arcadie/fix-vecdeque-move
Fixes in VecDeque, Generics and Arc sections
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
Dhghomon 637c7daf4b
Merge pull request #35 from Arcadie/master
Fix small typos in filter_map, get rid of into_iter() for range
4 years ago
Arcadie e773c679bd Impl Trait - make snippets compile by fixing ignore message 4 years ago
Arcadie b710e5cc67 Merge branch 'master' of github.com:Arcadie/easy_rust 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
Dhghomon 2b26205271
Merge pull request #34 from AlexanderWillner/master
Enhanced create book script and added it to the make file
4 years ago
Alexander Willner 717e792076 new ignore string 4 years ago
Alexander Willner 8c0d7a3b79 getting all code snippets to compile or to be skipped 4 years ago
Arcadie acd5a7ca1b 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
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 995a2da33c making snippets is phony 4 years ago
Alexander Willner f19b0b7823 enhance create book script and added it to the make file 4 years ago
Alexander Willner 195482f7ce Merge branch 'master' of https://github.com/Dhghomon/easy_rust 4 years ago
Dhghomon 36c3e5d0f9
Merge pull request #33 from AlexanderWillner/master
Suggestion: make each snippet compilable
4 years ago
Alexander Willner f9be669881 Added md2src 4 years ago