Commit dd3ecef
committed
Merge #31: Remove
3280db4 Remove Eq trait bound (Tobin C. Harding)
Pull request description:
The `PartialOrd` trait is object safe but `Ord` is not. We can make `ArbitraryOrd` object safe by softening the bounds and only requiring `PartialEq` - we still provide a blanket implementation of `Ord` if `Eq` is implemented for `T`.
Add a unit test that verifies using `Box<dyn T>` - props to Poelstra for the idea.
ACKs for top commit:
apoelstra:
ACK 3280db4; successfully ran local tests; nice! Yeah, we never would have gotten this right by hand
Tree-SHA512: 865b2f2b8689d843b0771924552819e4d0e60ea53a3affcaa68c66bdeccb1cb9708073ee8baa25d641c4af647a2c1017a7791508f3b826f414ba411ccc58e1c7Eq trait bound1 file changed
+17
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
157 | | - | |
| 157 | + | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
161 | | - | |
| 160 | + | |
| 161 | + | |
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
| |||
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
263 | 276 | | |
0 commit comments