mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-03-18 05:37:52 +02:00
Document the historical reference in the newtypes example (#826)
Document the historical reference in the newtypes example.
This commit is contained in:
parent
cb32c4d108
commit
b2ebd8848c
@ -39,5 +39,6 @@ fn main() {
|
||||
* The value passed some validation when it was created, so you no longer have to validate it again at every use: 'PhoneNumber(String)` or `OddNumber(u32)`.
|
||||
* Demonstrate how to add a `f64` value to a `Newtons` type by accessing the single field in the newtype.
|
||||
* Rust generally doesn’t like inexplicit things, like automatic unwrapping or for instance using booleans as integers.
|
||||
* Operator overloading is discussed on Day 3 (generics).
|
||||
* Operator overloading is discussed on Day 3 (generics).
|
||||
* The example is a subtle reference to the [Mars Climate Orbiter](https://en.wikipedia.org/wiki/Mars_Climate_Orbiter) failure.
|
||||
</details>
|
||||
|
Loading…
x
Reference in New Issue
Block a user