Ver código fonte

Merge remote-tracking branch 'origin/hw1' into hw1

Joshua Rutschmann 8 anos atrás
pai
commit
058ea89043
2 arquivos alterados com 8 adições e 2 exclusões
  1. 6
    0
      hw1/task2/Cargo.toml
  2. 2
    2
      hw1/task2/src/lib.rs

+ 6
- 0
hw1/task2/Cargo.toml Ver arquivo

@@ -0,0 +1,6 @@
1
+[package]
2
+name = "task2"
3
+version = "0.1.0"
4
+authors = ["Lorenz Bung <lorenz.bung@googlemail.com>"]
5
+
6
+[dependencies]

+ 2
- 2
hw1/task2/src/lib.rs Ver arquivo

@@ -1,8 +1,8 @@
1 1
 pub fn square(n: u32) -> u64 {
2
-    unimplemented!()
2
+    println!(n)
3
+    n * n
3 4
 }
4 5
 
5 6
 
6 7
 pub fn total() -> u64 {
7
-    unimplemented!();
8 8
 }

Carregando…
Cancelar
Salvar