1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-04-01 17:34:25 +02:00

Update points-polygons.md (#234)

Adding speaker notes with key things that might be present in the solution.
This commit is contained in:
Igor Petruk 2023-01-26 18:04:03 +00:00 committed by GitHub
parent 4588d95427
commit 585509bb0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,3 +39,15 @@ tests pass:
#[allow(dead_code)]
fn main() {}
```
<details>
Since the method signatures are missing from the problem statements, the key part
of the exercise is to specify those correctly.
Other interesting parts of the exercise:
* Derive a `Copy` trait for some structs, as in tests the methods sometimes don't borrow their arguments.
* Discover that `Add` trait must be implemented for two objects to be addable via "+".
</details>