fix: change 、to .

This commit is contained in:
katopz
2022-11-07 11:06:19 +07:00
parent 14a2600176
commit a46840763e
13 changed files with 105 additions and 105 deletions

View File

@ -1,4 +1,4 @@
1
1.
```rust
fn main() {
@ -13,7 +13,7 @@ fn main() {
}
```
2
2.
```rust
fn main() {
@ -39,7 +39,7 @@ fn main() {
}
```
3
3.
```rust
fn main() {
@ -85,7 +85,7 @@ fn take<T>(_v: &T) {
}
```
4
4.
```rust
fn main() {
@ -98,7 +98,7 @@ fn main() {
}
```
5
5.
```rust
fn fn_once<F>(func: F)
@ -130,7 +130,7 @@ fn main() {
}
```
6
6.
```rust
fn main() {
@ -148,7 +148,7 @@ fn exec<'a, F: FnMut(&'a str)>(mut f: F) {
}
```
7
7.
```rust
// A function which takes a closure as an argument and calls it.
@ -203,7 +203,7 @@ fn main() {
}
```
8
8.
```rust
fn main() {
@ -219,7 +219,7 @@ fn exec<'a, F: FnOnce(&'a str) -> String>(mut f: F) {
}
```
9
9.
```rust
// Define a function which takes a generic `F` argument
@ -242,7 +242,7 @@ fn main() {
}
```
10
10.
```rust
/* Fill in the blank and fix the errror */
@ -277,7 +277,7 @@ fn main() {
}
```
11
11.
```rust
// Every closure has its own type. Even if one closure has the same representation as another, their types are different.

View File

@ -1,4 +1,4 @@
1
1.
```rust
fn main() {
@ -9,7 +9,7 @@ fn main() {
}
```
2
2.
```rust
fn main() {
@ -22,7 +22,7 @@ fn main() {
}
```
3
3.
```rust
fn main() {
@ -50,7 +50,7 @@ fn main() {
}
```
4
4.
```rust
fn main() {
@ -63,7 +63,7 @@ fn main() {
}
```
5
5.
```rust
fn main() {
@ -80,7 +80,7 @@ fn main() {
}
```
6
6.
```rust
fn main() {
@ -95,7 +95,7 @@ fn main() {
}
```
7
7.
```rust
struct Fibonacci {
@ -142,7 +142,7 @@ fn main() {
}
```
8
8.
```rust
fn main() {
@ -159,7 +159,7 @@ fn main() {
}
```
9
9.
```rust
use std::collections::HashMap;
@ -177,7 +177,7 @@ fn main() {
}
```
10
10.
```rust
fn main() {
@ -189,7 +189,7 @@ fn main() {
}
```
11
11.
```rust
use std::collections::HashMap;
@ -202,7 +202,7 @@ fn main() {
}
```
12
12.
```rust
#[derive(PartialEq, Debug)]

View File

@ -1,4 +1,4 @@
1
1.
```rust
struct DoubleRef<'a,'b:'a, T> {
@ -10,7 +10,7 @@ fn main() {
}
```
2
2.
```rust
struct ImportantExcerpt<'a> {
@ -29,7 +29,7 @@ fn main() {
}
```
3
3.
```rust
fn f<'a, 'b>(x: &'a i32, mut y: &'b i32) where 'a: 'b {
@ -41,7 +41,7 @@ fn main() {
}
```
4
4.
```rust
fn call_on_ref_zero<F>(f: F) where for<'a> F: Fn(&'a i32) {
@ -65,7 +65,7 @@ fn call_on_ref_zero<F>(f: F) where F: for<'a> Fn(&'a i32) {
}
```
5
5.
```rust
fn main() {
@ -80,7 +80,7 @@ fn main() {
}
```
6
6.
```rust
struct Interface<'b, 'a: 'b> {

View File

@ -1,4 +1,4 @@
1
1.
```rust
fn main() {
@ -26,7 +26,7 @@ fn need_static(r : &'static str) {
}
```
2
2.
```rust
#[derive(Debug)]
@ -55,7 +55,7 @@ fn main() {
}
```
3
3.
```rust
fn main() {
@ -67,7 +67,7 @@ fn main() {
}
```
5
5.
```rust
use std::fmt::Debug;

View File

@ -1,4 +1,4 @@
1
1.
```rust
use std::fmt;
@ -17,7 +17,7 @@ fn main() {
}
```
2
2.
```rust
struct Meters(u32);
@ -31,7 +31,7 @@ fn main() {
}
```
3
3.
```rust
struct Years(i64);
@ -64,7 +64,7 @@ fn main() {
}
```
4、Sometimes `newtype` pattern can provide extra readability.
4. Sometimes `newtype` pattern can provide extra readability.
```rust
use std::ops::Add;
@ -97,7 +97,7 @@ fn calculate_distance(d1: Meters, d2: Meters) -> Meters {
}
```
5
5.
```rust
enum VeryVerboseEnumOfThingsToDoWithNumbers {
@ -115,7 +115,7 @@ fn main() {
}
```
6
6.
```rust
enum VeryVerboseEnumOfThingsToDoWithNumbers {
@ -135,7 +135,7 @@ impl VeryVerboseEnumOfThingsToDoWithNumbers {
fn main() {}
```
7
7.
```rust
fn my_function<const N: usize>() -> [u32; N] {
@ -148,7 +148,7 @@ fn main() {
}
```
8
8.
```rust
fn main() {
@ -158,7 +158,7 @@ fn main() {
}
```
9
9.
```rust
use std::fmt::Display;