mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-20 23:27:31 +00:00
silenced clippy warning (#6565)
This commit is contained in:
@@ -96,6 +96,7 @@ impl flatbuffers::EndianScalar for Color {
|
|||||||
Self(b)
|
Self(b)
|
||||||
}
|
}
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[allow(clippy::wrong_self_convention)]
|
||||||
fn from_little_endian(self) -> Self {
|
fn from_little_endian(self) -> Self {
|
||||||
let b = i8::from_le(self.0);
|
let b = i8::from_le(self.0);
|
||||||
Self(b)
|
Self(b)
|
||||||
@@ -180,6 +181,7 @@ impl flatbuffers::EndianScalar for Equipment {
|
|||||||
Self(b)
|
Self(b)
|
||||||
}
|
}
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[allow(clippy::wrong_self_convention)]
|
||||||
fn from_little_endian(self) -> Self {
|
fn from_little_endian(self) -> Self {
|
||||||
let b = u8::from_le(self.0);
|
let b = u8::from_le(self.0);
|
||||||
Self(b)
|
Self(b)
|
||||||
|
|||||||
@@ -743,6 +743,7 @@ class RustGenerator : public BaseGenerator {
|
|||||||
code_ += " {{FROM_BASE}}";
|
code_ += " {{FROM_BASE}}";
|
||||||
code_ += " }";
|
code_ += " }";
|
||||||
code_ += " #[inline]";
|
code_ += " #[inline]";
|
||||||
|
code_ += " #[allow(clippy::wrong_self_convention)]";
|
||||||
code_ += " fn from_little_endian(self) -> Self {";
|
code_ += " fn from_little_endian(self) -> Self {";
|
||||||
code_ += " let b = {{BASE_TYPE}}::from_le({{INTO_BASE}});";
|
code_ += " let b = {{BASE_TYPE}}::from_le({{INTO_BASE}});";
|
||||||
code_ += " {{FROM_BASE}}";
|
code_ += " {{FROM_BASE}}";
|
||||||
|
|||||||
@@ -91,6 +91,7 @@ impl flatbuffers::EndianScalar for FromInclude {
|
|||||||
Self(b)
|
Self(b)
|
||||||
}
|
}
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[allow(clippy::wrong_self_convention)]
|
||||||
fn from_little_endian(self) -> Self {
|
fn from_little_endian(self) -> Self {
|
||||||
let b = i64::from_le(self.0);
|
let b = i64::from_le(self.0);
|
||||||
Self(b)
|
Self(b)
|
||||||
|
|||||||
@@ -292,6 +292,7 @@ impl flatbuffers::EndianScalar for Color {
|
|||||||
unsafe { Self::from_bits_unchecked(b) }
|
unsafe { Self::from_bits_unchecked(b) }
|
||||||
}
|
}
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[allow(clippy::wrong_self_convention)]
|
||||||
fn from_little_endian(self) -> Self {
|
fn from_little_endian(self) -> Self {
|
||||||
let b = u8::from_le(self.bits());
|
let b = u8::from_le(self.bits());
|
||||||
unsafe { Self::from_bits_unchecked(b) }
|
unsafe { Self::from_bits_unchecked(b) }
|
||||||
@@ -384,6 +385,7 @@ impl flatbuffers::EndianScalar for Race {
|
|||||||
Self(b)
|
Self(b)
|
||||||
}
|
}
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[allow(clippy::wrong_self_convention)]
|
||||||
fn from_little_endian(self) -> Self {
|
fn from_little_endian(self) -> Self {
|
||||||
let b = i8::from_le(self.0);
|
let b = i8::from_le(self.0);
|
||||||
Self(b)
|
Self(b)
|
||||||
@@ -476,6 +478,7 @@ impl flatbuffers::EndianScalar for Any {
|
|||||||
Self(b)
|
Self(b)
|
||||||
}
|
}
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[allow(clippy::wrong_self_convention)]
|
||||||
fn from_little_endian(self) -> Self {
|
fn from_little_endian(self) -> Self {
|
||||||
let b = u8::from_le(self.0);
|
let b = u8::from_le(self.0);
|
||||||
Self(b)
|
Self(b)
|
||||||
@@ -664,6 +667,7 @@ impl flatbuffers::EndianScalar for AnyUniqueAliases {
|
|||||||
Self(b)
|
Self(b)
|
||||||
}
|
}
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[allow(clippy::wrong_self_convention)]
|
||||||
fn from_little_endian(self) -> Self {
|
fn from_little_endian(self) -> Self {
|
||||||
let b = u8::from_le(self.0);
|
let b = u8::from_le(self.0);
|
||||||
Self(b)
|
Self(b)
|
||||||
@@ -852,6 +856,7 @@ impl flatbuffers::EndianScalar for AnyAmbiguousAliases {
|
|||||||
Self(b)
|
Self(b)
|
||||||
}
|
}
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[allow(clippy::wrong_self_convention)]
|
||||||
fn from_little_endian(self) -> Self {
|
fn from_little_endian(self) -> Self {
|
||||||
let b = u8::from_le(self.0);
|
let b = u8::from_le(self.0);
|
||||||
Self(b)
|
Self(b)
|
||||||
|
|||||||
@@ -79,6 +79,7 @@ impl flatbuffers::EndianScalar for ABC {
|
|||||||
Self(b)
|
Self(b)
|
||||||
}
|
}
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[allow(clippy::wrong_self_convention)]
|
||||||
fn from_little_endian(self) -> Self {
|
fn from_little_endian(self) -> Self {
|
||||||
let b = i32::from_le(self.0);
|
let b = i32::from_le(self.0);
|
||||||
Self(b)
|
Self(b)
|
||||||
|
|||||||
@@ -92,6 +92,7 @@ impl flatbuffers::EndianScalar for UnionInNestedNS {
|
|||||||
Self(b)
|
Self(b)
|
||||||
}
|
}
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[allow(clippy::wrong_self_convention)]
|
||||||
fn from_little_endian(self) -> Self {
|
fn from_little_endian(self) -> Self {
|
||||||
let b = u8::from_le(self.0);
|
let b = u8::from_le(self.0);
|
||||||
Self(b)
|
Self(b)
|
||||||
@@ -228,6 +229,7 @@ impl flatbuffers::EndianScalar for EnumInNestedNS {
|
|||||||
Self(b)
|
Self(b)
|
||||||
}
|
}
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[allow(clippy::wrong_self_convention)]
|
||||||
fn from_little_endian(self) -> Self {
|
fn from_little_endian(self) -> Self {
|
||||||
let b = i8::from_le(self.0);
|
let b = i8::from_le(self.0);
|
||||||
Self(b)
|
Self(b)
|
||||||
|
|||||||
@@ -92,6 +92,7 @@ impl flatbuffers::EndianScalar for UnionInNestedNS {
|
|||||||
Self(b)
|
Self(b)
|
||||||
}
|
}
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[allow(clippy::wrong_self_convention)]
|
||||||
fn from_little_endian(self) -> Self {
|
fn from_little_endian(self) -> Self {
|
||||||
let b = u8::from_le(self.0);
|
let b = u8::from_le(self.0);
|
||||||
Self(b)
|
Self(b)
|
||||||
@@ -228,6 +229,7 @@ impl flatbuffers::EndianScalar for EnumInNestedNS {
|
|||||||
Self(b)
|
Self(b)
|
||||||
}
|
}
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[allow(clippy::wrong_self_convention)]
|
||||||
fn from_little_endian(self) -> Self {
|
fn from_little_endian(self) -> Self {
|
||||||
let b = i8::from_le(self.0);
|
let b = i8::from_le(self.0);
|
||||||
Self(b)
|
Self(b)
|
||||||
|
|||||||
@@ -88,6 +88,7 @@ impl flatbuffers::EndianScalar for OptionalByte {
|
|||||||
Self(b)
|
Self(b)
|
||||||
}
|
}
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[allow(clippy::wrong_self_convention)]
|
||||||
fn from_little_endian(self) -> Self {
|
fn from_little_endian(self) -> Self {
|
||||||
let b = i8::from_le(self.0);
|
let b = i8::from_le(self.0);
|
||||||
Self(b)
|
Self(b)
|
||||||
|
|||||||
Reference in New Issue
Block a user