From f340f9647d041792b79d623b6631e3081d52b17b Mon Sep 17 00:00:00 2001 From: Julio Biason Date: Wed, 8 May 2019 09:24:06 -0300 Subject: [PATCH] A few more pointers to Rust --- porque-rust.html | 39 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/porque-rust.html b/porque-rust.html index 3c348cb..49f3883 100644 --- a/porque-rust.html +++ b/porque-rust.html @@ -93,6 +93,19 @@ +
+
+

História

+ +
    +
  • Criada em 2006 por Graydon Hoare.
  • +
  • Patrocinada pela Mozilla em 2009.
  • +
  • Versão 1.0 em 2015.
  • +
  • Versão atual: 1.34.1.
  • +
+
+
+

@@ -711,11 +724,11 @@ OK(())

-

Structs

-
+

Structs

+

-struct Present {
+struct Gift {
     package_color: String,
     content: String
 }
@@ -725,6 +738,14 @@ struct Present {
                              Structs em Rust são basicamente o mesmo que em C.
                         
                     
+ +
+

Structs

+ +

+let presente = Gift { "red", "A GIFT!" };
+						
+
@@ -931,6 +952,18 @@ fn call_isan(num: &str) -> Result<Success, Error> {
+
+

E agora?

+ + +
+