-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove lots of
as
casts with modern alternatives:
* `a as *mut T` => `a.cast()` * `a.offset(b as isize)` => `a.add(b)` * `a.offset(-(b as isize))` => `a.sub(b)` * `u32 as usize` => `usize::try_from(_).unwrap()` In general `as` has the potential of losing bits so try to avoid it where we can.
- Loading branch information
1 parent
9a0e6a1
commit c860a51
Showing
1 changed file
with
59 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters