Browse Source

Merge branch 'hotfix/20190702.1'

master
Julio Biason 5 years ago
parent
commit
b494492ab9
  1. 14
      quick-rust.html

14
quick-rust.html

@ -415,11 +415,11 @@ enum IPAddr {
<h3>Mas De Volta ao Rust</h3> <h3>Mas De Volta ao Rust</h3>
<pre><code class="rust"> <pre><code class="rust">
let home = IpAddr::V4(String::from("127.0.0.1"); let home = IpAddr::IPV4(String::from("127.0.0.1");
match home { match home {
V4(ipv4_address) =&gt; println!("IPv4 addr: {}", ipv4_address), IPV4(ipv4_address) =&gt; println!("IPv4 addr: {}", ipv4_address),
V6(ipv6_address) =&gt; println!("Ipv6 addr: {}", ipv6_address), IPV6(ipv6_address) =&gt; println!("Ipv6 addr: {}", ipv6_address),
} }
</code></pre> </code></pre>
</section> </section>
@ -436,7 +436,7 @@ match home {
<pre><code class="rust"> <pre><code class="rust">
struct MyStruct { struct MyStruct {
a_field: String, a_field: String,
r_a: [2; 10u64], r_a: [2u64; 10],
} }
</code></pre> </code></pre>
</section> </section>
@ -447,7 +447,7 @@ struct MyStruct {
<pre><code class="rust"> <pre><code class="rust">
impl MyStruct { impl MyStruct {
fn first_element(&amp;self) -&gt; u64 { fn first_element(&amp;self) -&gt; u64 {
self.r_a.get(1) self.r_a.get(0)
} }
} }
</code></pre> </code></pre>
@ -730,6 +730,10 @@ fn main() {
</aside> </aside>
</p> </p>
</section> </section>
<section>
<img src="_images/rust-issues.png" alt="4.5k issues no Github" class="stretch">
</section>
</section> </section>
<section> <section>

Loading…
Cancel
Save