Add more comments and examples.

This commit is contained in:
Stephen Chung
2020-03-19 13:52:10 +08:00
parent b3efb8b264
commit cc8ec12691
14 changed files with 633 additions and 245 deletions

View File

@@ -10,7 +10,7 @@ impl TestStruct {
self.x += 1000;
}
fn new() -> TestStruct {
fn new() -> Self {
TestStruct { x: 1 }
}
}

View File

@@ -10,7 +10,7 @@ impl TestStruct {
self.x += 1000;
}
fn new() -> TestStruct {
fn new() -> Self {
TestStruct { x: 1 }
}
}