Commit a1e0091
committed
Allow
The rationale behind this change is to avoid unnecessary casts that may
hurt readability, such as: `0_usize as isize`.
With this change, we are allowed to omit the cast, as it will be
performed inside the `offset` function.
This also has the advantage of panicking whenever we try to cast a usize
larger than `isize::MAX`.Ptr::offset() to receive any value that can cast to isize1 parent d82d983 commit a1e0091
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
296 | 296 | | |
297 | 297 | | |
298 | 298 | | |
299 | | - | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
300 | 304 | | |
301 | 305 | | |
302 | 306 | | |
| |||
0 commit comments