add solutions for variables

This commit is contained in:
sunface
2022-03-01 22:06:38 +08:00
parent 47d37b6940
commit 258f0ed589
32 changed files with 85 additions and 24 deletions

View File

@@ -87,3 +87,4 @@ fn main() {
```
> You can find the solutions [here](https://github.com/sunface/rust-by-practice)(under the solutions path), but only use it when you need it

View File

@@ -70,7 +70,7 @@ fn main() {
}
```
🌟🌟 使用枚举对类型进行同一化
🌟🌟
```rust,editable
@@ -198,4 +198,6 @@ fn main() {
println!("linked list has length: {}", list.len());
println!("{}", list.stringify());
}
```
```
> You can find the solutions [here](https://github.com/sunface/rust-by-practice)(under the solutions path), but only use it when you need it

View File

@@ -86,3 +86,5 @@ fn first_word(s: &str) -> &str {
&s[..1]
}
```
> You can find the solutions [here](https://github.com/sunface/rust-by-practice)(under the solutions path), but only use it when you need it

View File

@@ -251,5 +251,4 @@ fn main() {
}
```
> You can find the solutions [here](https://github.com/sunface/rust-by-practice)(under the solutions path), but only use it when you need it

View File

@@ -213,4 +213,6 @@ fn main() {
println!("{}, {}, {:?}",f.name, f.data, f);
}
```
```
> You can find the solutions [here](https://github.com/sunface/rust-by-practice)(under the solutions path), but only use it when you need it

View File

@@ -75,3 +75,5 @@ fn sum_multiply(nums: (i32, i32)) -> (i32, i32) {
(nums.0 + nums.1, nums.0 * nums.1)
}
```
> You can find the solutions [here](https://github.com/sunface/rust-by-practice)(under the solutions path), but only use it when you need it