From e4eeb6b805bc7d27773ef460baf61f831df10706 Mon Sep 17 00:00:00 2001 From: Julio Biason Date: Wed, 17 Apr 2019 09:29:41 -0300 Subject: [PATCH 1/2] Small comment about testing in Rust --- porque-rust.html | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/porque-rust.html b/porque-rust.html index 881753d..eee7b6d 100644 --- a/porque-rust.html +++ b/porque-rust.html @@ -780,7 +780,7 @@ fn get_summary(summarizable: T) -> String

Structs genéricas


-struct Point {
+struct Point<T> {
     x: T,
     y: T
 }
@@ -788,6 +788,33 @@ struct Point {
                     
                 
 
+				
+
+

Tests

+ +

+#[cfg(test)]
+mod tests {
+    #[test]
+    fn testing() {
+    }
+}
+						
+
+ +
+

+$ cargo test
+   Compiling adder v0.1.0 (file:///projects/adder)
+    Finished dev [unoptimized + debuginfo] target(s) in 0.22 secs
+     Running target/debug/deps/adder-ce99bcc2479f4607
+
+running 1 test
+test tests::testing ... ok
+                        
+
+
+

Crazy stuff

From 64686a8f5e0844cc5dee1ce36518c931dae7a58d Mon Sep 17 00:00:00 2001 From: Julio Biason Date: Wed, 17 Apr 2019 09:33:01 -0300 Subject: [PATCH 2/2] Small comment about cargo --- porque-rust.html | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/porque-rust.html b/porque-rust.html index eee7b6d..3c348cb 100644 --- a/porque-rust.html +++ b/porque-rust.html @@ -788,6 +788,25 @@ struct Point<T> {
+
+
+

+ + Cargo + +

+ +

"Cargo is the Rust package manager"

+ +

+ "Cargo downloads your Rust package’s dependencies, + compiles your packages, makes distributable + packages, and uploads them to crates.io, the Rust + community’s package registry." +

+
+
+

Tests