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:
@@ -84,4 +84,6 @@ fn main() {
|
||||
let unit: () = ();
|
||||
assert!(size_of_val(&unit) == 4);
|
||||
}
|
||||
```
|
||||
```
|
||||
|
||||
> 你可以在[这里](https://github.com/sunface/rust-by-practice)找到答案(在 solutions 路径下)
|
@@ -40,4 +40,6 @@ fn never_return() -> ! {
|
||||
// 实现这个函数,不要修改函数签名!
|
||||
|
||||
}
|
||||
```
|
||||
```
|
||||
|
||||
> 你可以在[这里](https://github.com/sunface/rust-by-practice)找到答案(在 solutions 路径下)
|
@@ -163,3 +163,5 @@ fn main() {
|
||||
println!("0x80 >> 2 is 0x{:x}", 0x80u32 >> 2);
|
||||
}
|
||||
```
|
||||
|
||||
> 你可以在[这里](https://github.com/sunface/rust-by-practice)找到答案(在 solutions 路径下)
|
@@ -56,4 +56,6 @@ fn main() {}
|
||||
fn sum(x: i32, y: i32) -> i32 {
|
||||
x + y;
|
||||
}
|
||||
```
|
||||
```
|
||||
|
||||
> 你可以在[这里](https://github.com/sunface/rust-by-practice)找到答案(在 solutions 路径下)
|
Reference in New Issue
Block a user