silenced clippy warning (#6565)

This commit is contained in:
Kamil Rojewski
2021-04-15 17:19:13 +02:00
committed by GitHub
parent df2df21ec1
commit c012f29f91
8 changed files with 15 additions and 0 deletions

View File

@@ -91,6 +91,7 @@ impl flatbuffers::EndianScalar for FromInclude {
Self(b)
}
#[inline]
#[allow(clippy::wrong_self_convention)]
fn from_little_endian(self) -> Self {
let b = i64::from_le(self.0);
Self(b)

View File

@@ -292,6 +292,7 @@ impl flatbuffers::EndianScalar for Color {
unsafe { Self::from_bits_unchecked(b) }
}
#[inline]
#[allow(clippy::wrong_self_convention)]
fn from_little_endian(self) -> Self {
let b = u8::from_le(self.bits());
unsafe { Self::from_bits_unchecked(b) }
@@ -384,6 +385,7 @@ impl flatbuffers::EndianScalar for Race {
Self(b)
}
#[inline]
#[allow(clippy::wrong_self_convention)]
fn from_little_endian(self) -> Self {
let b = i8::from_le(self.0);
Self(b)
@@ -476,6 +478,7 @@ impl flatbuffers::EndianScalar for Any {
Self(b)
}
#[inline]
#[allow(clippy::wrong_self_convention)]
fn from_little_endian(self) -> Self {
let b = u8::from_le(self.0);
Self(b)
@@ -664,6 +667,7 @@ impl flatbuffers::EndianScalar for AnyUniqueAliases {
Self(b)
}
#[inline]
#[allow(clippy::wrong_self_convention)]
fn from_little_endian(self) -> Self {
let b = u8::from_le(self.0);
Self(b)
@@ -852,6 +856,7 @@ impl flatbuffers::EndianScalar for AnyAmbiguousAliases {
Self(b)
}
#[inline]
#[allow(clippy::wrong_self_convention)]
fn from_little_endian(self) -> Self {
let b = u8::from_le(self.0);
Self(b)

View File

@@ -79,6 +79,7 @@ impl flatbuffers::EndianScalar for ABC {
Self(b)
}
#[inline]
#[allow(clippy::wrong_self_convention)]
fn from_little_endian(self) -> Self {
let b = i32::from_le(self.0);
Self(b)

View File

@@ -92,6 +92,7 @@ impl flatbuffers::EndianScalar for UnionInNestedNS {
Self(b)
}
#[inline]
#[allow(clippy::wrong_self_convention)]
fn from_little_endian(self) -> Self {
let b = u8::from_le(self.0);
Self(b)
@@ -228,6 +229,7 @@ impl flatbuffers::EndianScalar for EnumInNestedNS {
Self(b)
}
#[inline]
#[allow(clippy::wrong_self_convention)]
fn from_little_endian(self) -> Self {
let b = i8::from_le(self.0);
Self(b)

View File

@@ -92,6 +92,7 @@ impl flatbuffers::EndianScalar for UnionInNestedNS {
Self(b)
}
#[inline]
#[allow(clippy::wrong_self_convention)]
fn from_little_endian(self) -> Self {
let b = u8::from_le(self.0);
Self(b)
@@ -228,6 +229,7 @@ impl flatbuffers::EndianScalar for EnumInNestedNS {
Self(b)
}
#[inline]
#[allow(clippy::wrong_self_convention)]
fn from_little_endian(self) -> Self {
let b = i8::from_le(self.0);
Self(b)

View File

@@ -88,6 +88,7 @@ impl flatbuffers::EndianScalar for OptionalByte {
Self(b)
}
#[inline]
#[allow(clippy::wrong_self_convention)]
fn from_little_endian(self) -> Self {
let b = i8::from_le(self.0);
Self(b)