woboq / qmetaobject-rs

Integrate Qml and Rust by building the QMetaObject at compile time.
MIT License
620 stars 89 forks source link

`QObject` and `QGadget` derives produce clippy warnings #291

Open lylythechosenone opened 11 months ago

lylythechosenone commented 11 months ago

In seemingly all situations, QGadget produces a clippy::transmute_ptr_to_ref warning. In a struct with signals, QObject produces a clippy::useless_transmute for each signal.

For both of these, the transmute should be replaced. For the first, &*val can be used instead of transmute(val). For the second, val as *const _ can be used instead of transmute(val).