Skip to content

Commit 357e134

Browse files
committed
*func
1 parent c7a5aa7 commit 357e134

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

rust/src/main.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,17 @@ fn main() {
77
// to stderr:
88
eprint!("error");
99
eprintln!(" + new line");
10-
}
1110

12-
#[test]
13-
fn constants() {
11+
assert_eq!(func(1), 2);
12+
1413
fn func(arg: i32) -> i32 {
1514
// immutable: arg += 1;
16-
arg + 1 // last value is return value
15+
arg + 1 // the last value is return value
1716
}
17+
}
1818

19-
assert_eq!(func(1), 2);
19+
#[test]
20+
fn constants() {
2021
let logical: bool;
2122
logical = true;
2223
assert!(logical);

0 commit comments

Comments
 (0)