according to the idea of gtm-nayan #144, add println!("Success") for each exercise

This commit is contained in:
sunface
2022-03-05 14:48:43 +08:00
parent 1000a3dc6e
commit 5394cdfcff
21 changed files with 201 additions and 13 deletions

View File

@ -11,6 +11,8 @@ fn main() {
let c2 = '中';
assert_eq!(size_of_val(&c2),3);
println!("Success!")
}
```
@ -31,13 +33,13 @@ fn print_char(c : char) {
3. 🌟
```rust, editable
// println! 工作
// make println! work
fn main() {
let _f: bool = false;
let t = true;
if !t {
println!("hello, world");
println!("Success!")
}
}
```
@ -49,6 +51,8 @@ fn main() {
let f = true;
let t = true && false;
assert_eq!(t, f);
println!("Success!")
}
```
@ -63,6 +67,8 @@ fn main() {
let v = (2, 3);
assert_eq!(v, implicitly_ret_unit())
println!("Success!")
}
fn implicitly_ret_unit() {
@ -83,6 +89,8 @@ use std::mem::size_of_val;
fn main() {
let unit: () = ();
assert!(size_of_val(&unit) == 4);
println!("Success!")
}
```