clippy saves the world part 3
parent
17a882cb20
commit
4399895d08
|
@ -27,6 +27,7 @@ macro_rules! define_fixed_type {
|
||||||
|
|
||||||
/// Creates a value of this type with the integral portion `n`.
|
/// Creates a value of this type with the integral portion `n`.
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[allow(clippy::cast_lossless)]
|
||||||
pub const fn from_int(n: $LT) -> Self
|
pub const fn from_int(n: $LT) -> Self
|
||||||
{
|
{
|
||||||
$Type(n as ($IT) << Self::FRACBITS)
|
$Type(n as ($IT) << Self::FRACBITS)
|
||||||
|
|
|
@ -382,7 +382,7 @@ impl ReadRleData for u16
|
||||||
p: &mut usize,
|
p: &mut usize,
|
||||||
cmp: bool,
|
cmp: bool,
|
||||||
len: usize,
|
len: usize,
|
||||||
out: &mut Vec<u16>)
|
out: &mut Vec<Self>)
|
||||||
{
|
{
|
||||||
if cmp {
|
if cmp {
|
||||||
let d = u16b(&b[*p..*p + 2]);
|
let d = u16b(&b[*p..*p + 2]);
|
||||||
|
@ -406,7 +406,7 @@ impl ReadRleData for u8
|
||||||
p: &mut usize,
|
p: &mut usize,
|
||||||
cmp: bool,
|
cmp: bool,
|
||||||
len: usize,
|
len: usize,
|
||||||
out: &mut Vec<u8>)
|
out: &mut Vec<Self>)
|
||||||
{
|
{
|
||||||
if cmp {
|
if cmp {
|
||||||
let d = b[*p];
|
let d = b[*p];
|
||||||
|
|
|
@ -114,7 +114,7 @@ pub fn read_wad(b: &[u8]) -> ResultS<Wad>
|
||||||
|
|
||||||
let old_wad = match ver_wad {
|
let old_wad = match ver_wad {
|
||||||
Ver::Base => true,
|
Ver::Base => true,
|
||||||
_ => false,
|
_ => false,
|
||||||
};
|
};
|
||||||
let old_dat = ver_dat == 0;
|
let old_dat = ver_dat == 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue