diff --git a/quick-rust.html b/quick-rust.html index 6c302d3..47dd8ea 100644 --- a/quick-rust.html +++ b/quick-rust.html @@ -415,11 +415,11 @@ enum IPAddr {

Mas De Volta ao Rust


-let home = IpAddr::V4(String::from("127.0.0.1");
+let home = IpAddr::IPV4(String::from("127.0.0.1");
 
 match home {
-    V4(ipv4_address) => println!("IPv4 addr: {}", ipv4_address),
-    V6(ipv6_address) => println!("Ipv6 addr: {}", ipv6_address),
+    IPV4(ipv4_address) => println!("IPv4 addr: {}", ipv4_address),
+    IPV6(ipv6_address) => println!("Ipv6 addr: {}", ipv6_address),
 }
                         
@@ -436,7 +436,7 @@ match home {

 struct MyStruct {
     a_field: String,
-    r_a: [2; 10u64],
+    r_a: [2u64; 10],
 }
                         
@@ -447,7 +447,7 @@ struct MyStruct {

 impl MyStruct {
     fn first_element(&self) -> u64 {
-        self.r_a.get(1)
+        self.r_a.get(0)
     }
 }
                         
@@ -730,6 +730,10 @@ fn main() {

+ +
+ 4.5k issues no Github +