From: Ralf Jung Date: Sun, 4 Oct 2015 09:43:28 +0000 (+0200) Subject: Merge pull request #4 from wimh/PratialEq X-Git-Url: https://git.ralfj.de/rust-101.git/commitdiff_plain/777ede1a30401628dd46e6b177892a5007cdc8da?hp=f41a988984bb5487de50168403c5e9a666512595 Merge pull request #4 from wimh/PratialEq fix typo PratialEq --- diff --git a/src/part07.rs b/src/part07.rs index 4cc58a4..eb1e0dc 100644 --- a/src/part07.rs +++ b/src/part07.rs @@ -65,7 +65,7 @@ impl PartialEq for BigInt { //@ the "partial", I suggest you check out the documentation of [`PartialEq`](https://doc.rust-lang.org/std/cmp/trait.PartialEq.html) //@ and [`Eq`](https://doc.rust-lang.org/std/cmp/trait.Eq.html). `Eq` can be automatically derived as well. -// Now we can compare `BigInt`s. Rust treats `PratialEq` special in that it is wired to the operator `==`: +// Now we can compare `BigInt`s. Rust treats `PartialEq` special in that it is wired to the operator `==`: //@ That operator can not be used on our numbers! Speaking in C++ terms, we just overloaded the `==` operator //@ for `BigInt`. Rust does not have function overloading (i.e., it will not dispatch to different //@ functions depending on the type of the argument). Instead, one typically finds (or defines) a diff --git a/workspace/src/part07.rs b/workspace/src/part07.rs index 3ea4cc0..916cb01 100644 --- a/workspace/src/part07.rs +++ b/workspace/src/part07.rs @@ -39,7 +39,7 @@ impl PartialEq for BigInt { } -// Now we can compare `BigInt`s. Rust treats `PratialEq` special in that it is wired to the operator `==`: +// Now we can compare `BigInt`s. Rust treats `PartialEq` special in that it is wired to the operator `==`: fn compare_big_ints() { let b1 = BigInt::new(13); let b2 = BigInt::new(37);