Commit Graph

3 Commits

Author SHA1 Message Date
Takayuki Nakata
75140e813f Fix a style of texts in size_of_in_element_count 2020-12-04 23:36:07 +09:00
unknown
c1a5329475 Add more functions to size_of_in_element_count
Specifically ptr::{sub, wrapping_sub, add, wrapping_add, offset, wrapping_offset} and slice::{from_raw_parts, from_raw_parts_mut}
The lint now also looks for size_of calls through casts (Since offset takes an isize)
2020-12-03 21:14:26 -03:00
unknown
af9685bb1e Rename unsafe_sizeof_count_copies to size_of_in_element_count
Also fix review comments:
 - Use const arrays and iterate them for the method/function names
 - merge 2 if_chain's into one using a rest pattern
 - remove unnecessary unsafe block in test

And make the lint only point to the count expression instead of the entire function call
2020-12-03 20:55:38 -03:00