mirror of
https://github.com/sunface/rust-by-practice.git
synced 2025-08-11 22:14:47 +00:00
add solutions for variables
This commit is contained in:
@@ -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
|
@@ -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
|
@@ -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
|
@@ -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
|
@@ -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
|
@@ -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
|
Reference in New Issue
Block a user