From 357390d91564f62c94b2ae4ca3f66394b386f531 Mon Sep 17 00:00:00 2001
From: Julio Biason Mas De Volta ao Rust
@@ -436,7 +436,7 @@ match home {
-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),
}
@@ -447,7 +447,7 @@ struct MyStruct {
struct MyStruct {
a_field: String,
- r_a: [2; 10u64],
+ r_a: [2u64; 10],
}
@@ -730,6 +730,10 @@ fn main() {
impl MyStruct {
fn first_element(&self) -> u64 {
- self.r_a.get(1)
+ self.r_a.get(0)
}
}