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:
@@ -83,3 +83,4 @@ fn main() {
|
||||
}
|
||||
```
|
||||
|
||||
> 你可以在[这里](https://github.com/sunface/rust-by-practice)找到答案(在 solutions 路径下)
|
@@ -189,4 +189,6 @@ fn main() {
|
||||
println!("链表的长度是: {}", list.len());
|
||||
println!("{}", list.stringify());
|
||||
}
|
||||
```
|
||||
```
|
||||
|
||||
> 你可以在[这里](https://github.com/sunface/rust-by-practice)找到答案(在 solutions 路径下)
|
@@ -88,3 +88,5 @@ fn first_word(s: &str) -> &str {
|
||||
&s[..1]
|
||||
}
|
||||
```
|
||||
|
||||
> 你可以在[这里](https://github.com/sunface/rust-by-practice)找到答案(在 solutions 路径下)
|
@@ -255,4 +255,4 @@ fn main() {
|
||||
```
|
||||
|
||||
|
||||
|
||||
> 你可以在[这里](https://github.com/sunface/rust-by-practice)找到答案(在 solutions 路径下)
|
@@ -215,4 +215,6 @@ fn main() {
|
||||
println!("{}, {}, {:?}",f.name, f.data, f);
|
||||
}
|
||||
```
|
||||
```
|
||||
|
||||
|
||||
> 你可以在[这里](https://github.com/sunface/rust-by-practice)找到答案(在 solutions 路径下)
|
||||
|
@@ -75,3 +75,6 @@ fn sum_multiply(nums: (i32, i32)) -> (i32, i32) {
|
||||
(nums.0 + nums.1, nums.0 * nums.1)
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
> 你可以在[这里](https://github.com/sunface/rust-by-practice)找到答案(在 solutions 路径下)
|
Reference in New Issue
Block a user