mirror of
https://github.com/sunface/rust-by-practice.git
synced 2025-06-23 04:29:41 +00:00
Fixed the missing semicolon
This commit is contained in:
@ -10,7 +10,7 @@ fn main() {
|
|||||||
let y: i32; // Uninitialized but also unused, will only receive a warning
|
let y: i32; // Uninitialized but also unused, will only receive a warning
|
||||||
|
|
||||||
assert_eq!(x, 5);
|
assert_eq!(x, 5);
|
||||||
println!("Success!")
|
println!("Success!");
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -23,7 +23,7 @@ fn main() {
|
|||||||
__ += 2;
|
__ += 2;
|
||||||
|
|
||||||
assert_eq!(x, 3);
|
assert_eq!(x, 3);
|
||||||
println!("Success!")
|
println!("Success!");
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -94,7 +94,7 @@ fn main() {
|
|||||||
// Shadowing
|
// Shadowing
|
||||||
let y = "I can also be bound to text!";
|
let y = "I can also be bound to text!";
|
||||||
|
|
||||||
println!("Success!")
|
println!("Success!");
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -130,7 +130,7 @@ fn main() {
|
|||||||
assert_eq!(x, 3);
|
assert_eq!(x, 3);
|
||||||
assert_eq!(y, 2);
|
assert_eq!(y, 2);
|
||||||
|
|
||||||
println!("Success!")
|
println!("Success!");
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -150,7 +150,7 @@ fn main() {
|
|||||||
// Fill the blank to make the code work
|
// Fill the blank to make the code work
|
||||||
assert_eq!([x,y], __);
|
assert_eq!([x,y], __);
|
||||||
|
|
||||||
println!("Success!")
|
println!("Success!");
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user