We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c7a5aa7 commit 357e134Copy full SHA for 357e134
1 file changed
rust/src/main.rs
@@ -7,16 +7,17 @@ fn main() {
7
// to stderr:
8
eprint!("error");
9
eprintln!(" + new line");
10
-}
11
12
-#[test]
13
-fn constants() {
+ assert_eq!(func(1), 2);
+
14
fn func(arg: i32) -> i32 {
15
// immutable: arg += 1;
16
- arg + 1 // last value is return value
+ arg + 1 // the last value is return value
17
}
+}
18
19
- assert_eq!(func(1), 2);
+#[test]
20
+fn constants() {
21
let logical: bool;
22
logical = true;
23
assert!(logical);
0 commit comments