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

@@ -88,6 +88,8 @@ fn main() {
data: [1, 2]
}
];
println!("Success!")
}
```
@@ -127,6 +129,8 @@ fn main() {
check_size(["hello你好"; __]); // size of &str ?
check_size(["hello你好".to_string(); __]); // size of String?
check_size(['中'; __]); // size of char ?
println!("Success!")
}

View File

@@ -28,6 +28,8 @@ fn main() {
// Implicitly specified type parameter `char` to `generic()`.
generic(__);
println!("Success!")
}
```
@@ -41,6 +43,8 @@ fn main() {
assert_eq!(5, sum(2i8, 3i8));
assert_eq!(50, sum(20, 30));
assert_eq!(2.46, sum(1.23, 1.23));
println!("Success!")
}
```
@@ -56,6 +60,8 @@ fn main() {
fn main() {
let integer = Point { x: 5, y: 10 };
let float = Point { x: 1.0, y: 4.0 };
println!("Success!")
}
```
@@ -71,6 +77,8 @@ struct Point<T> {
fn main() {
// DON'T modify here
let p = Point{x: 5, y : "hello".to_string()};
println!("Success!")
}
```
@@ -118,6 +126,8 @@ fn main() {
assert_eq!(p3.x, 5);
assert_eq!(p3.y, '中');
println!("Success!")
}
```

View File

@@ -106,6 +106,8 @@ fn main() {
let t = Teacher {};
assert_eq!(t.say_hi(), "Hi, I'm your new teacher");
assert_eq!(t.say_something(), "I'm not a bad teacher");
println!("Success!")
}
```
@@ -177,6 +179,8 @@ fn multipl
fn main() {
assert_eq!(6, multiply(2u8, 3u8));
assert_eq!(5.0, multiply(1.0, 5.0));
println!("Success!")
}
```
@@ -217,6 +221,8 @@ fn main() {
// you need to derive some trait for FooBar to make it comparable
assert_eq!(Foo + Bar, FooBar);
assert_eq!(Foo - Bar, BarFoo);
println!("Success!")
}
```
@@ -456,5 +462,7 @@ fn example2() {
fn main() {
example1();
example2();
println!("Success!")
}
```