mirror of
https://git.proxmox.com/git/proxmox
synced 2025-04-28 15:25:44 +00:00
router: ignore clippy lint missing_transmute_annotations
the `ApiHandler`'s `PartialEq` implementation makes heavy use of `transmute`. clippy wants the types to be explicitly stated here and not inferred, to avoid potential undefined behaviour if an unexpected type is inferred. however, the types that would be inferred here are so complex, that the code would become illegible anyway, so ignore this lint for now. [1]: https://rust-lang.github.io/rust-clippy/master/index.html#missing_transmute_annotations Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
This commit is contained in:
parent
dcc6eb9918
commit
f9dd576783
@ -495,6 +495,7 @@ impl Eq for ApiHandler {}
|
||||
impl PartialEq for ApiHandler {
|
||||
fn eq(&self, rhs: &Self) -> bool {
|
||||
unsafe {
|
||||
#[allow(clippy::missing_transmute_annotations)]
|
||||
match (self, rhs) {
|
||||
(ApiHandler::Sync(l), ApiHandler::Sync(r)) => {
|
||||
core::mem::transmute::<_, usize>(l) == core::mem::transmute::<_, usize>(r)
|
||||
|
Loading…
Reference in New Issue
Block a user