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