From 3fc49d1f312a1e97e934ddfcc152227c023a249d Mon Sep 17 00:00:00 2001 From: Jason Mobarak Date: Wed, 23 Nov 2022 09:21:07 +1100 Subject: [PATCH 1/9] rust: add clippy check --- .github/workflows/rust.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/rust.yaml b/.github/workflows/rust.yaml index bf4cbb5845..4356b8eaae 100644 --- a/.github/workflows/rust.yaml +++ b/.github/workflows/rust.yaml @@ -38,6 +38,12 @@ jobs: command: fmt args: -- --check + - uses: actions-rs/cargo@v1 + name: Lint Check + with: + command: clippy + args: --all-features --all-targets -- -D warnings + test: name: Tests runs-on: ubuntu-latest From c8843ef821988d33b65103ab22b8336b347ac6b2 Mon Sep 17 00:00:00 2001 From: Jason Mobarak Date: Wed, 23 Nov 2022 05:27:00 +1100 Subject: [PATCH 2/9] rust: clippy fix-ups (#1247) --- .../resources/rust/sbp_messages_template.rs | 2 + rust/sbp/src/messages/acquisition.rs | 8 +++ rust/sbp/src/messages/bootload.rs | 6 +++ rust/sbp/src/messages/ext_events.rs | 1 + rust/sbp/src/messages/file_io.rs | 9 ++++ rust/sbp/src/messages/flash.rs | 10 ++++ rust/sbp/src/messages/gnss.rs | 7 +++ rust/sbp/src/messages/imu.rs | 2 + rust/sbp/src/messages/integrity.rs | 7 +++ rust/sbp/src/messages/linux.rs | 11 ++++ rust/sbp/src/messages/logging.rs | 3 ++ rust/sbp/src/messages/mag.rs | 1 + rust/sbp/src/messages/navigation.rs | 54 +++++++++++++++++++ rust/sbp/src/messages/ndb.rs | 1 + rust/sbp/src/messages/observation.rs | 54 +++++++++++++++++++ rust/sbp/src/messages/orientation.rs | 4 ++ rust/sbp/src/messages/piksi.rs | 45 ++++++++++++++++ rust/sbp/src/messages/sbas.rs | 1 + rust/sbp/src/messages/settings.rs | 10 ++++ rust/sbp/src/messages/signing.rs | 3 ++ rust/sbp/src/messages/solution_meta.rs | 6 +++ rust/sbp/src/messages/ssr.rs | 36 +++++++++++++ rust/sbp/src/messages/system.rs | 15 ++++++ rust/sbp/src/messages/tracking.rs | 15 ++++++ rust/sbp/src/messages/unknown.rs | 2 +- rust/sbp/src/messages/user.rs | 1 + rust/sbp/src/messages/vehicle.rs | 2 + rust/sbp/src/sbp_string.rs | 16 +++--- 28 files changed, 323 insertions(+), 9 deletions(-) diff --git a/generator/sbpg/targets/resources/rust/sbp_messages_template.rs b/generator/sbpg/targets/resources/rust/sbp_messages_template.rs index 8c7f77e960..26cb13a4f3 100644 --- a/generator/sbpg/targets/resources/rust/sbp_messages_template.rs +++ b/generator/sbpg/targets/resources/rust/sbp_messages_template.rs @@ -42,6 +42,7 @@ use crate::messages::(((i)))::*; /// (((m.short_desc))) ((*- endif *)) #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct (((m.msg_name))) { ((*- if m.is_real_message *)) @@ -86,6 +87,7 @@ impl (((m.msg_name))) { } ((* elif b.type == "bool" *)) /// Gets the `(((b.bitrange_name)))` flag. + #[allow(clippy::identity_op)] pub fn (((b.bitrange_name))) (&self) -> bool { ( ( self.(((b.field))) >> (((b.msb))) ) & 1) == 1 } diff --git a/rust/sbp/src/messages/acquisition.rs b/rust/sbp/src/messages/acquisition.rs index 6682daeab9..c00920b628 100644 --- a/rust/sbp/src/messages/acquisition.rs +++ b/rust/sbp/src/messages/acquisition.rs @@ -36,6 +36,7 @@ pub mod acq_sv_profile { /// the performance. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct AcqSvProfile { /// SV search job type (deep, fallback, etc) @@ -148,6 +149,7 @@ pub mod acq_sv_profile_dep { /// Deprecated. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct AcqSvProfileDep { /// SV search job type (deep, fallback, etc) @@ -263,6 +265,7 @@ pub mod msg_acq_result { /// space with the best carrier-to-noise (CN/0) ratio. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgAcqResult { /// The message sender_id @@ -356,6 +359,7 @@ pub mod msg_acq_result_dep_a { /// Deprecated. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgAcqResultDepA { /// The message sender_id @@ -451,6 +455,7 @@ pub mod msg_acq_result_dep_b { /// Deprecated. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgAcqResultDepB { /// The message sender_id @@ -545,6 +550,7 @@ pub mod msg_acq_result_dep_c { /// Deprecated. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgAcqResultDepC { /// The message sender_id @@ -639,6 +645,7 @@ pub mod msg_acq_sv_profile { /// is used to debug and measure the performance. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgAcqSvProfile { /// The message sender_id @@ -711,6 +718,7 @@ pub mod msg_acq_sv_profile_dep { /// Deprecated. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgAcqSvProfileDep { /// The message sender_id diff --git a/rust/sbp/src/messages/bootload.rs b/rust/sbp/src/messages/bootload.rs index 35b038c99a..61e105280c 100644 --- a/rust/sbp/src/messages/bootload.rs +++ b/rust/sbp/src/messages/bootload.rs @@ -35,6 +35,7 @@ pub mod msg_bootloader_handshake_dep_a { /// Deprecated. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgBootloaderHandshakeDepA { /// The message sender_id @@ -108,6 +109,7 @@ pub mod msg_bootloader_handshake_req { /// is MSG_BOOTLOADER_HANDSHAKE_RESP. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgBootloaderHandshakeReq { /// The message sender_id @@ -174,6 +176,7 @@ pub mod msg_bootloader_handshake_resp { /// number and the SBP protocol version number. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgBootloaderHandshakeResp { /// The message sender_id @@ -293,6 +296,7 @@ pub mod msg_bootloader_jump_to_app { /// The host initiates the bootloader to jump to the application. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgBootloaderJumpToApp { /// The message sender_id @@ -369,6 +373,7 @@ pub mod msg_nap_device_dna_req { /// number. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgNapDeviceDnaReq { /// The message sender_id @@ -437,6 +442,7 @@ pub mod msg_nap_device_dna_resp { /// number. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgNapDeviceDnaResp { /// The message sender_id diff --git a/rust/sbp/src/messages/ext_events.rs b/rust/sbp/src/messages/ext_events.rs index 4bcd9c103c..34e0ca7009 100644 --- a/rust/sbp/src/messages/ext_events.rs +++ b/rust/sbp/src/messages/ext_events.rs @@ -28,6 +28,7 @@ pub mod msg_ext_event { /// pin it was and whether it was rising or falling. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgExtEvent { /// The message sender_id diff --git a/rust/sbp/src/messages/file_io.rs b/rust/sbp/src/messages/file_io.rs index c62cd7fa6d..204697a7ac 100644 --- a/rust/sbp/src/messages/file_io.rs +++ b/rust/sbp/src/messages/file_io.rs @@ -44,6 +44,7 @@ pub mod msg_fileio_config_req { /// operations. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgFileioConfigReq { /// The message sender_id @@ -119,6 +120,7 @@ pub mod msg_fileio_config_resp { /// operations. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgFileioConfigResp { /// The message sender_id @@ -219,6 +221,7 @@ pub mod msg_fileio_read_dir_req { /// ID 0x42. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgFileioReadDirReq { /// The message sender_id @@ -308,6 +311,7 @@ pub mod msg_fileio_read_dir_resp { /// sequence number in the response is preserved from the request. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgFileioReadDirResp { /// The message sender_id @@ -390,6 +394,7 @@ pub mod msg_fileio_read_req { /// message when it is received from sender ID 0x42. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgFileioReadReq { /// The message sender_id @@ -485,6 +490,7 @@ pub mod msg_fileio_read_resp { /// sequence number in the response is preserved from the request. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgFileioReadResp { /// The message sender_id @@ -564,6 +570,7 @@ pub mod msg_fileio_remove { /// received from sender ID 0x42. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgFileioRemove { /// The message sender_id @@ -641,6 +648,7 @@ pub mod msg_fileio_write_req { /// received from sender ID 0x42. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgFileioWriteReq { /// The message sender_id @@ -736,6 +744,7 @@ pub mod msg_fileio_write_resp { /// number in the response is preserved from the request. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgFileioWriteResp { /// The message sender_id diff --git a/rust/sbp/src/messages/flash.rs b/rust/sbp/src/messages/flash.rs index da5fdadc0b..c5137b8fd3 100644 --- a/rust/sbp/src/messages/flash.rs +++ b/rust/sbp/src/messages/flash.rs @@ -41,6 +41,7 @@ pub mod msg_flash_done { /// this message on failure. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgFlashDone { /// The message sender_id @@ -181,6 +182,7 @@ pub mod msg_flash_erase { /// FLASH_INVALID_FLASH (1) if the flash specified is invalid. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgFlashErase { /// The message sender_id @@ -307,6 +309,7 @@ pub mod msg_flash_program { /// addresses must be erased before addresses can be programmed. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgFlashProgram { /// The message sender_id @@ -450,6 +453,7 @@ pub mod msg_flash_read_req { /// allowed range. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgFlashReadReq { /// The message sender_id @@ -586,6 +590,7 @@ pub mod msg_flash_read_resp { /// allowed range. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgFlashReadResp { /// The message sender_id @@ -718,6 +723,7 @@ pub mod msg_m25_flash_write_status { /// The device replies with a MSG_FLASH_DONE message. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgM25FlashWriteStatus { /// The message sender_id @@ -790,6 +796,7 @@ pub mod msg_stm_flash_lock_sector { /// replies with a MSG_FLASH_DONE message. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgStmFlashLockSector { /// The message sender_id @@ -862,6 +869,7 @@ pub mod msg_stm_flash_unlock_sector { /// device replies with a MSG_FLASH_DONE message. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgStmFlashUnlockSector { /// The message sender_id @@ -936,6 +944,7 @@ pub mod msg_stm_unique_id_req { /// MSG_STM_UNIQUE_ID_RESP with the 12-byte unique ID in the payload. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgStmUniqueIdReq { /// The message sender_id @@ -1002,6 +1011,7 @@ pub mod msg_stm_unique_id_resp { /// MSG_STM_UNIQUE_ID_RESP with the 12-byte unique ID in the payload. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgStmUniqueIdResp { /// The message sender_id diff --git a/rust/sbp/src/messages/gnss.rs b/rust/sbp/src/messages/gnss.rs index b4d9d9dfc9..b82f9ab2cb 100644 --- a/rust/sbp/src/messages/gnss.rs +++ b/rust/sbp/src/messages/gnss.rs @@ -34,6 +34,7 @@ pub mod carrier_phase { /// fractional cycles. This phase has the same sign as the pseudorange. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct CarrierPhase { /// Carrier phase whole cycles @@ -75,6 +76,7 @@ pub mod gps_time { /// observations are epoch aligned so ns field will be 0. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct GpsTime { /// Milliseconds since start of GPS week @@ -125,6 +127,7 @@ pub mod gps_time_dep { /// beginning of the week on the Saturday/Sunday transition. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct GpsTimeDep { /// Milliseconds since start of GPS week @@ -165,6 +168,7 @@ pub mod gps_time_sec { /// on the Saturday/Sunday transition. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct GpsTimeSec { /// Seconds since start of GPS week @@ -205,6 +209,7 @@ pub mod gnss_signal { /// identifier. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct GnssSignal { /// Constellation-specific satellite id. For GLO can either be (100+FCN) @@ -340,6 +345,7 @@ pub mod gnss_signal_dep { /// Deprecated. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct GnssSignalDep { /// Constellation-specific satellite identifier. @@ -462,6 +468,7 @@ pub mod sv_id { /// vehicle. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct SvId { /// Constellation-specific satellite id. For GLO can either be (100+FCN) diff --git a/rust/sbp/src/messages/imu.rs b/rust/sbp/src/messages/imu.rs index c865ea5692..2890e58aab 100644 --- a/rust/sbp/src/messages/imu.rs +++ b/rust/sbp/src/messages/imu.rs @@ -29,6 +29,7 @@ pub mod msg_imu_aux { /// depends on the value of `imu_type`. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgImuAux { /// The message sender_id @@ -284,6 +285,7 @@ pub mod msg_imu_raw { /// The time-tagging mode should not change throughout a run. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgImuRaw { /// The message sender_id diff --git a/rust/sbp/src/messages/integrity.rs b/rust/sbp/src/messages/integrity.rs index 2ba816b68f..4b68795a8c 100644 --- a/rust/sbp/src/messages/integrity.rs +++ b/rust/sbp/src/messages/integrity.rs @@ -29,6 +29,7 @@ pub mod integrity_ssr_header { use crate::messages::lib::*; /// Common fields for SSR integrity messages #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct IntegritySSRHeader { /// GNSS reference time of the observation used to generate the flag. @@ -130,6 +131,7 @@ pub mod msg_ssr_flag_high_level { /// elements in the group. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgSsrFlagHighLevel { /// The message sender_id @@ -705,6 +707,7 @@ pub mod msg_ssr_flag_iono_grid_points { use crate::messages::lib::*; /// List of grid points which are faulty #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgSsrFlagIonoGridPoints { /// The message sender_id @@ -787,6 +790,7 @@ pub mod msg_ssr_flag_iono_grid_point_sat_los { use crate::messages::lib::*; /// List of all the grid points to satellite which are faulty #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgSsrFlagIonoGridPointSatLos { /// The message sender_id @@ -876,6 +880,7 @@ pub mod msg_ssr_flag_iono_tile_sat_los { use crate::messages::lib::*; /// List of all the LOS which are faulty #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgSsrFlagIonoTileSatLos { /// The message sender_id @@ -958,6 +963,7 @@ pub mod msg_ssr_flag_satellites { use crate::messages::lib::*; /// List of satellites which are faulty, per constellation #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgSsrFlagSatellites { /// The message sender_id @@ -1075,6 +1081,7 @@ pub mod msg_ssr_flag_tropo_grid_points { use crate::messages::lib::*; /// List of grid points which are faulty #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgSsrFlagTropoGridPoints { /// The message sender_id diff --git a/rust/sbp/src/messages/linux.rs b/rust/sbp/src/messages/linux.rs index 75c1491436..e5fca7b5ae 100644 --- a/rust/sbp/src/messages/linux.rs +++ b/rust/sbp/src/messages/linux.rs @@ -37,6 +37,7 @@ pub mod msg_linux_cpu_state { /// of CPU on the system, including a timestamp. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgLinuxCpuState { /// The message sender_id @@ -197,6 +198,7 @@ pub mod msg_linux_cpu_state_dep_a { /// of CPU on the system. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgLinuxCpuStateDepA { /// The message sender_id @@ -297,6 +299,7 @@ pub mod msg_linux_mem_state { /// of memory on the system, including a timestamp. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgLinuxMemState { /// The message sender_id @@ -457,6 +460,7 @@ pub mod msg_linux_mem_state_dep_a { /// of memory on the system. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgLinuxMemStateDepA { /// The message sender_id @@ -556,6 +560,7 @@ pub mod msg_linux_process_fd_count { /// Top 10 list of processes with a large number of open file descriptors. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgLinuxProcessFdCount { /// The message sender_id @@ -648,6 +653,7 @@ pub mod msg_linux_process_fd_summary { /// Summary of open file descriptors on the system. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgLinuxProcessFdSummary { /// The message sender_id @@ -729,6 +735,7 @@ pub mod msg_linux_process_socket_counts { /// Top 10 list of processes with high socket counts. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgLinuxProcessSocketCounts { /// The message sender_id @@ -839,6 +846,7 @@ pub mod msg_linux_process_socket_queues { /// Top 10 list of sockets with deep queues. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgLinuxProcessSocketQueues { /// The message sender_id @@ -964,6 +972,7 @@ pub mod msg_linux_socket_usage { /// Summaries the socket usage across the system. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgLinuxSocketUsage { /// The message sender_id @@ -1061,6 +1070,7 @@ pub mod msg_linux_sys_state { /// timestamp. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgLinuxSysState { /// The message sender_id @@ -1227,6 +1237,7 @@ pub mod msg_linux_sys_state_dep_a { /// This presents a summary of CPU and memory utilization. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgLinuxSysStateDepA { /// The message sender_id diff --git a/rust/sbp/src/messages/logging.rs b/rust/sbp/src/messages/logging.rs index bdcbd21509..369cb15ca6 100644 --- a/rust/sbp/src/messages/logging.rs +++ b/rust/sbp/src/messages/logging.rs @@ -35,6 +35,7 @@ pub mod msg_fwd { /// are implementation defined. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgFwd { /// The message sender_id @@ -122,6 +123,7 @@ pub mod msg_log { /// DEBUG, INFO logging levels. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgLog { /// The message sender_id @@ -275,6 +277,7 @@ pub mod msg_print_dep { /// Deprecated. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgPrintDep { /// The message sender_id diff --git a/rust/sbp/src/messages/mag.rs b/rust/sbp/src/messages/mag.rs index f66dd82be7..ebeb4c9d59 100644 --- a/rust/sbp/src/messages/mag.rs +++ b/rust/sbp/src/messages/mag.rs @@ -26,6 +26,7 @@ pub mod msg_mag_raw { /// Raw data from the magnetometer. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgMagRaw { /// The message sender_id diff --git a/rust/sbp/src/messages/navigation.rs b/rust/sbp/src/messages/navigation.rs index 41d24831e5..294223d752 100644 --- a/rust/sbp/src/messages/navigation.rs +++ b/rust/sbp/src/messages/navigation.rs @@ -86,6 +86,7 @@ pub mod estimated_horizontal_error_ellipse { use crate::messages::lib::*; /// Horizontal estimated error ellipse #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct EstimatedHorizontalErrorEllipse { /// The semi major axis of the estimated horizontal error ellipse at the @@ -138,6 +139,7 @@ pub mod msg_age_corrections { /// Differential solution. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgAgeCorrections { /// The message sender_id @@ -226,6 +228,7 @@ pub mod msg_baseline_ecef { /// preceding MSG_GPS_TIME with the matching time-of-week (tow). /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgBaselineEcef { /// The message sender_id @@ -407,6 +410,7 @@ pub mod msg_baseline_ecef_dep_a { /// preceding MSG_GPS_TIME with the matching time-of-week (tow). /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgBaselineEcefDepA { /// The message sender_id @@ -671,6 +675,7 @@ pub mod msg_baseline_heading_dep_a { /// preceding MSG_GPS_TIME with the matching time-of-week (tow). /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgBaselineHeadingDepA { /// The message sender_id @@ -917,6 +922,7 @@ pub mod msg_baseline_ned { /// week (tow). /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgBaselineNed { /// The message sender_id @@ -1107,6 +1113,7 @@ pub mod msg_baseline_ned_dep_a { /// week (tow). /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgBaselineNedDepA { /// The message sender_id @@ -1379,6 +1386,7 @@ pub mod msg_dops { /// or SPP solution. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgDops { /// The message sender_id @@ -1409,6 +1417,7 @@ pub mod msg_dops { impl MsgDops { /// Gets the `raim_repair_flag` flag. + #[allow(clippy::identity_op)] pub fn raim_repair_flag(&self) -> bool { ((self.flags >> 7) & 1) == 1 } @@ -1583,6 +1592,7 @@ pub mod msg_dops_dep_a { /// navigation satellite geometry on positional measurement precision. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgDopsDepA { /// The message sender_id @@ -1708,6 +1718,7 @@ pub mod msg_gps_time { /// these messages. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgGpsTime { /// The message sender_id @@ -1876,6 +1887,7 @@ pub mod msg_gps_time_dep_a { /// these messages. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgGpsTimeDepA { /// The message sender_id @@ -1993,6 +2005,7 @@ pub mod msg_gps_time_gnss { /// these messages. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgGpsTimeGnss { /// The message sender_id @@ -2157,6 +2170,7 @@ pub mod msg_pose_relative { /// first keyframe. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgPoseRelative { /// The message sender_id @@ -2539,6 +2553,7 @@ pub mod msg_pos_ecef { /// MSG_GPS_TIME with the matching time-of-week (tow). /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgPosEcef { /// The message sender_id @@ -2830,6 +2845,7 @@ pub mod msg_pos_ecef_cov { /// MSG_GPS_TIME with the matching time-of-week (tow). /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgPosEcefCov { /// The message sender_id @@ -3156,6 +3172,7 @@ pub mod msg_pos_ecef_cov_gnss { /// MSG_GPS_TIME with the matching time-of-week (tow). /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgPosEcefCovGnss { /// The message sender_id @@ -3385,6 +3402,7 @@ pub mod msg_pos_ecef_dep_a { /// MSG_GPS_TIME with the matching time-of-week (tow). /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgPosEcefDepA { /// The message sender_id @@ -3658,6 +3676,7 @@ pub mod msg_pos_ecef_gnss { /// MSG_GPS_TIME with the matching time-of-week (tow). /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgPosEcefGnss { /// The message sender_id @@ -3852,6 +3871,7 @@ pub mod msg_pos_llh { /// matching time-of-week (tow). /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgPosLlh { /// The message sender_id @@ -4152,6 +4172,7 @@ pub mod msg_pos_llh_acc { /// The user-configured percentile is encoded in the percentile field. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgPosLlhAcc { /// The message sender_id @@ -4598,6 +4619,7 @@ pub mod msg_pos_llh_cov { /// with the sign convention. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgPosLlhCov { /// The message sender_id @@ -4924,6 +4946,7 @@ pub mod msg_pos_llh_cov_gnss { /// should be taken with the sign convention. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgPosLlhCovGnss { /// The message sender_id @@ -5158,6 +5181,7 @@ pub mod msg_pos_llh_dep_a { /// matching time-of-week (tow). /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgPosLlhDepA { /// The message sender_id @@ -5484,6 +5508,7 @@ pub mod msg_pos_llh_gnss { /// matching time-of-week (tow). /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgPosLlhGnss { /// The message sender_id @@ -5681,6 +5706,7 @@ pub mod msg_protection_level { /// the matching time-of-week (tow). /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgProtectionLevel { /// The message sender_id @@ -5817,6 +5843,7 @@ pub mod msg_protection_level { } /// Gets the `velocity_valid` flag. + #[allow(clippy::identity_op)] pub fn velocity_valid(&self) -> bool { ((self.flags >> 21) & 1) == 1 } @@ -5827,6 +5854,7 @@ pub mod msg_protection_level { } /// Gets the `attitude_valid` flag. + #[allow(clippy::identity_op)] pub fn attitude_valid(&self) -> bool { ((self.flags >> 22) & 1) == 1 } @@ -5837,6 +5865,7 @@ pub mod msg_protection_level { } /// Gets the `safe_state_hpl` flag. + #[allow(clippy::identity_op)] pub fn safe_state_hpl(&self) -> bool { ((self.flags >> 23) & 1) == 1 } @@ -5847,6 +5876,7 @@ pub mod msg_protection_level { } /// Gets the `safe_state_vpl` flag. + #[allow(clippy::identity_op)] pub fn safe_state_vpl(&self) -> bool { ((self.flags >> 24) & 1) == 1 } @@ -5857,6 +5887,7 @@ pub mod msg_protection_level { } /// Gets the `safe_state_atpl` flag. + #[allow(clippy::identity_op)] pub fn safe_state_atpl(&self) -> bool { ((self.flags >> 25) & 1) == 1 } @@ -5867,6 +5898,7 @@ pub mod msg_protection_level { } /// Gets the `safe_state_ctpl` flag. + #[allow(clippy::identity_op)] pub fn safe_state_ctpl(&self) -> bool { ((self.flags >> 26) & 1) == 1 } @@ -5877,6 +5909,7 @@ pub mod msg_protection_level { } /// Gets the `safe_state_hvpl` flag. + #[allow(clippy::identity_op)] pub fn safe_state_hvpl(&self) -> bool { ((self.flags >> 27) & 1) == 1 } @@ -5887,6 +5920,7 @@ pub mod msg_protection_level { } /// Gets the `safe_state_vvpl` flag. + #[allow(clippy::identity_op)] pub fn safe_state_vvpl(&self) -> bool { ((self.flags >> 28) & 1) == 1 } @@ -5897,6 +5931,7 @@ pub mod msg_protection_level { } /// Gets the `safe_state_hopl` flag. + #[allow(clippy::identity_op)] pub fn safe_state_hopl(&self) -> bool { ((self.flags >> 29) & 1) == 1 } @@ -5907,6 +5942,7 @@ pub mod msg_protection_level { } /// Gets the `safe_state_popl` flag. + #[allow(clippy::identity_op)] pub fn safe_state_popl(&self) -> bool { ((self.flags >> 30) & 1) == 1 } @@ -5917,6 +5953,7 @@ pub mod msg_protection_level { } /// Gets the `safe_state_ropl` flag. + #[allow(clippy::identity_op)] pub fn safe_state_ropl(&self) -> bool { ((self.flags >> 31) & 1) == 1 } @@ -6199,6 +6236,7 @@ pub mod msg_protection_level_dep_a { /// by the preceding MSG_GPS_TIME with the matching time-of-week (tow). /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgProtectionLevelDepA { /// The message sender_id @@ -6384,6 +6422,7 @@ pub mod msg_reference_frame_param { use crate::messages::lib::*; /// Reference Frame Transformation Parameters #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgReferenceFrameParam { /// The message sender_id @@ -6591,6 +6630,7 @@ pub mod msg_utc_leap_second { /// for announced insertions) UTC leap second insertion. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgUtcLeapSecond { /// The message sender_id @@ -6720,6 +6760,7 @@ pub mod msg_utc_time { /// fix. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgUtcTime { /// The message sender_id @@ -6958,6 +6999,7 @@ pub mod msg_utc_time_gnss { /// fix. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgUtcTimeGnss { /// The message sender_id @@ -7202,6 +7244,7 @@ pub mod msg_vel_body { /// products and is not available from Piksi Multi or Duro. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgVelBody { /// The message sender_id @@ -7469,6 +7512,7 @@ pub mod msg_vel_cog { /// but not necessarily the device heading. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgVelCog { /// The message sender_id @@ -7925,6 +7969,7 @@ pub mod msg_vel_ecef { /// the matching time-of-week (tow). /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgVelEcef { /// The message sender_id @@ -8193,6 +8238,7 @@ pub mod msg_vel_ecef_cov { /// the matching time-of-week (tow). /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgVelEcefCov { /// The message sender_id @@ -8496,6 +8542,7 @@ pub mod msg_vel_ecef_cov_gnss { /// the matching time-of-week (tow). /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgVelEcefCovGnss { /// The message sender_id @@ -8706,6 +8753,7 @@ pub mod msg_vel_ecef_dep_a { /// the matching time-of-week (tow). /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgVelEcefDepA { /// The message sender_id @@ -8830,6 +8878,7 @@ pub mod msg_vel_ecef_gnss { /// the matching time-of-week (tow). /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgVelEcefGnss { /// The message sender_id @@ -9006,6 +9055,7 @@ pub mod msg_vel_ned { /// by the preceding MSG_GPS_TIME with the matching time-of-week (tow). /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgVelNed { /// The message sender_id @@ -9284,6 +9334,7 @@ pub mod msg_vel_ned_cov { /// triangular portion of the 3x3 covariance matrix. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgVelNedCov { /// The message sender_id @@ -9590,6 +9641,7 @@ pub mod msg_vel_ned_cov_gnss { /// triangular portion of the 3x3 covariance matrix. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgVelNedCovGnss { /// The message sender_id @@ -9801,6 +9853,7 @@ pub mod msg_vel_ned_dep_a { /// by the preceding MSG_GPS_TIME with the matching time-of-week (tow). /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgVelNedDepA { /// The message sender_id @@ -9933,6 +9986,7 @@ pub mod msg_vel_ned_gnss { /// by the preceding MSG_GPS_TIME with the matching time-of-week (tow). /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgVelNedGnss { /// The message sender_id diff --git a/rust/sbp/src/messages/ndb.rs b/rust/sbp/src/messages/ndb.rs index 671b55707f..119ac9a204 100644 --- a/rust/sbp/src/messages/ndb.rs +++ b/rust/sbp/src/messages/ndb.rs @@ -28,6 +28,7 @@ pub mod msg_ndb_event { /// message could also be sent out when fetching an object from NDB. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgNdbEvent { /// The message sender_id diff --git a/rust/sbp/src/messages/observation.rs b/rust/sbp/src/messages/observation.rs index 963485ae85..25db874bc9 100644 --- a/rust/sbp/src/messages/observation.rs +++ b/rust/sbp/src/messages/observation.rs @@ -78,6 +78,7 @@ pub mod almanac_common_content { use crate::messages::lib::*; /// Common fields for every almanac message #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct AlmanacCommonContent { /// GNSS signal identifier @@ -157,6 +158,7 @@ pub mod almanac_common_content_dep { use crate::messages::lib::*; /// Common fields for every almanac message #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct AlmanacCommonContentDep { /// GNSS signal identifier @@ -243,6 +245,7 @@ pub mod carrier_phase_dep_a { /// GPS receiver and the phase has the opposite sign as the pseudorange. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct CarrierPhaseDepA { /// Carrier phase whole cycles @@ -285,6 +288,7 @@ pub mod doppler { /// doppler. This doppler is defined as positive for approaching satellites. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct Doppler { /// Doppler whole Hz @@ -321,6 +325,7 @@ pub mod ephemeris_common_content { use crate::messages::lib::*; /// Common fields for every ephemeris message #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct EphemerisCommonContent { /// GNSS signal identifier (16 bit) @@ -390,6 +395,7 @@ pub mod ephemeris_common_content_dep_a { use crate::messages::lib::*; /// Common fields for every ephemeris message #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct EphemerisCommonContentDepA { /// GNSS signal identifier @@ -459,6 +465,7 @@ pub mod ephemeris_common_content_dep_b { use crate::messages::lib::*; /// Common fields for every ephemeris message #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct EphemerisCommonContentDepB { /// GNSS signal identifier (16 bit) @@ -527,6 +534,7 @@ pub mod gnss_capb { use crate::messages::lib::*; /// GNSS capabilities masks #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct GnssCapb { /// GPS SV active mask @@ -665,6 +673,7 @@ pub mod msg_almanac_glo { /// almanac" for details. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgAlmanacGlo { /// The message sender_id @@ -790,6 +799,7 @@ pub mod msg_almanac_glo_dep { /// almanac" for details. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgAlmanacGloDep { /// The message sender_id @@ -915,6 +925,7 @@ pub mod msg_almanac_gps { /// GPS-200, Chapter 20.3.3.5.1.2 Almanac Data) for more details. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgAlmanacGps { /// The message sender_id @@ -1053,6 +1064,7 @@ pub mod msg_almanac_gps_dep { /// GPS-200, Chapter 20.3.3.5.1.2 Almanac Data) for more details. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgAlmanacGpsDep { /// The message sender_id @@ -1192,6 +1204,7 @@ pub mod msg_base_pos_ecef { /// in an error in the pseudo-absolute position output. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgBasePosEcef { /// The message sender_id @@ -1279,6 +1292,7 @@ pub mod msg_base_pos_llh { /// error here will result in an error in the pseudo-absolute position output. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgBasePosLlh { /// The message sender_id @@ -1366,6 +1380,7 @@ pub mod msg_ephemeris_bds { /// Table 5-9 for more details. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgEphemerisBds { /// The message sender_id @@ -1607,6 +1622,7 @@ pub mod msg_ephemeris_dep_a { /// Deprecated. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgEphemerisDepA { /// The message sender_id @@ -1858,6 +1874,7 @@ pub mod msg_ephemeris_dep_b { /// Deprecated. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgEphemerisDepB { /// The message sender_id @@ -2119,6 +2136,7 @@ pub mod msg_ephemeris_dep_c { /// GPS-200, Table 20-III) for more details. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgEphemerisDepC { /// The message sender_id @@ -2394,6 +2412,7 @@ pub mod msg_ephemeris_dep_d { /// GPS-200, Table 20-III) for more details. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgEphemerisDepD { /// The message sender_id @@ -2669,6 +2688,7 @@ pub mod msg_ephemeris_gal { /// for more details. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgEphemerisGal { /// The message sender_id @@ -2914,6 +2934,7 @@ pub mod msg_ephemeris_gal_dep_a { /// message with explicit source of NAV data. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgEphemerisGalDepA { /// The message sender_id @@ -3154,6 +3175,7 @@ pub mod msg_ephemeris_glo { /// immediate information (ephemeris parameters)" for more details. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgEphemerisGlo { /// The message sender_id @@ -3285,6 +3307,7 @@ pub mod msg_ephemeris_glo_dep_a { /// immediate information (ephemeris parameters)" for more details. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgEphemerisGloDepA { /// The message sender_id @@ -3395,6 +3418,7 @@ pub mod msg_ephemeris_glo_dep_b { /// immediate information (ephemeris parameters)" for more details. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgEphemerisGloDepB { /// The message sender_id @@ -3505,6 +3529,7 @@ pub mod msg_ephemeris_glo_dep_c { /// immediate information (ephemeris parameters)" for more details. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgEphemerisGloDepC { /// The message sender_id @@ -3627,6 +3652,7 @@ pub mod msg_ephemeris_glo_dep_d { /// using floats for size reduction. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgEphemerisGloDepD { /// The message sender_id @@ -3758,6 +3784,7 @@ pub mod msg_ephemeris_gps { /// GPS-200, Table 20-III) for more details. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgEphemerisGps { /// The message sender_id @@ -3991,6 +4018,7 @@ pub mod msg_ephemeris_gps_dep_e { /// GPS-200, Table 20-III) for more details. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgEphemerisGpsDepE { /// The message sender_id @@ -4222,6 +4250,7 @@ pub mod msg_ephemeris_gps_dep_f { /// using floats for size reduction. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgEphemerisGpsDepF { /// The message sender_id @@ -4453,6 +4482,7 @@ pub mod msg_ephemeris_qzss { /// used to calculate QZSS satellite position, velocity, and clock offset. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgEphemerisQzss { /// The message sender_id @@ -4679,6 +4709,7 @@ pub mod msg_ephemeris_sbas { use crate::messages::lib::*; /// Satellite broadcast ephemeris for SBAS #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgEphemerisSbas { /// The message sender_id @@ -4782,6 +4813,7 @@ pub mod msg_ephemeris_sbas_dep_a { use crate::messages::lib::*; /// Satellite broadcast ephemeris for SBAS #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgEphemerisSbasDepA { /// The message sender_id @@ -4890,6 +4922,7 @@ pub mod msg_ephemeris_sbas_dep_b { /// using floats for size reduction. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgEphemerisSbasDepB { /// The message sender_id @@ -4999,6 +5032,7 @@ pub mod msg_glo_biases { /// receiver of different manufacturers). /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgGloBiases { /// The message sender_id @@ -5095,6 +5129,7 @@ pub mod msg_gnss_capb { use crate::messages::lib::*; /// GNSS capabilities #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgGnssCapb { /// The message sender_id @@ -5173,6 +5208,7 @@ pub mod msg_group_delay { /// Please see ICD-GPS-200 (30.3.3.3.1.1) for more details. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgGroupDelay { /// The message sender_id @@ -5278,6 +5314,7 @@ pub mod msg_group_delay_dep_a { /// Please see ICD-GPS-200 (30.3.3.3.1.1) for more details. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgGroupDelayDepA { /// The message sender_id @@ -5383,6 +5420,7 @@ pub mod msg_group_delay_dep_b { /// Please see ICD-GPS-200 (30.3.3.3.1.1) for more details. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgGroupDelayDepB { /// The message sender_id @@ -5490,6 +5528,7 @@ pub mod msg_iono { /// Please see ICD-GPS-200 (Chapter 20.3.3.5.1.7) for more details. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgIono { /// The message sender_id @@ -5615,6 +5654,7 @@ pub mod msg_obs { /// and conform with typical RTCMv3 GNSS observations. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgObs { /// The message sender_id @@ -5706,6 +5746,7 @@ pub mod msg_obs_dep_a { /// Deprecated. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgObsDepA { /// The message sender_id @@ -5800,6 +5841,7 @@ pub mod msg_obs_dep_b { /// 3rd party GNSS receivers or typical RTCMv3 observations. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgObsDepB { /// The message sender_id @@ -5896,6 +5938,7 @@ pub mod msg_obs_dep_c { /// conform with typical RTCMv3 GNSS observations. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgObsDepC { /// The message sender_id @@ -5988,6 +6031,7 @@ pub mod msg_osr { /// format. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgOsr { /// The message sender_id @@ -6080,6 +6124,7 @@ pub mod msg_sv_az_el { /// does have ephemeris or almanac for. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgSvAzEl { /// The message sender_id @@ -6152,6 +6197,7 @@ pub mod msg_sv_configuration_gps_dep { /// Please see ICD-GPS-200 (Chapter 20.3.3.5.1.4) for more details. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgSvConfigurationGpsDep { /// The message sender_id @@ -6229,6 +6275,7 @@ pub mod observation_header { /// Header of a GNSS observation message. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct ObservationHeader { /// GNSS time of this observation @@ -6270,6 +6317,7 @@ pub mod observation_header_dep { /// Header of a GPS observation message. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct ObservationHeaderDep { /// GPS time of this observation @@ -6317,6 +6365,7 @@ pub mod packed_obs_content { /// currently performed. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct PackedObsContent { /// Pseudorange observation @@ -6639,6 +6688,7 @@ pub mod packed_obs_content_dep_a { /// Deprecated. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct PackedObsContentDepA { /// Pseudorange observation @@ -6705,6 +6755,7 @@ pub mod packed_obs_content_dep_b { /// Pseudoranges are referenced to a nominal pseudorange. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct PackedObsContentDepB { /// Pseudorange observation @@ -6772,6 +6823,7 @@ pub mod packed_obs_content_dep_c { /// with typical RTCMv3 GNSS observations. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct PackedObsContentDepC { /// Pseudorange observation @@ -6837,6 +6889,7 @@ pub mod packed_osr_content { /// Pseudorange and carrier phase network corrections for a satellite signal. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct PackedOsrContent { /// Pseudorange observation @@ -7166,6 +7219,7 @@ pub mod sv_az_el { /// Satellite azimuth and elevation. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct SvAzEl { /// GNSS signal identifier diff --git a/rust/sbp/src/messages/orientation.rs b/rust/sbp/src/messages/orientation.rs index d4419a6a19..a1c203f327 100644 --- a/rust/sbp/src/messages/orientation.rs +++ b/rust/sbp/src/messages/orientation.rs @@ -37,6 +37,7 @@ pub mod msg_angular_rate { /// of Swift Products and is not produced by Piksi Multi or Duro. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgAngularRate { /// The message sender_id @@ -195,6 +196,7 @@ pub mod msg_baseline_heading { /// moving. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgBaselineHeading { /// The message sender_id @@ -357,6 +359,7 @@ pub mod msg_orient_euler { /// Multi or Duro. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgOrientEuler { /// The message sender_id @@ -537,6 +540,7 @@ pub mod msg_orient_quat { /// Multi or Duro. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgOrientQuat { /// The message sender_id diff --git a/rust/sbp/src/messages/piksi.rs b/rust/sbp/src/messages/piksi.rs index edf50a35a9..8511ff5e9c 100644 --- a/rust/sbp/src/messages/piksi.rs +++ b/rust/sbp/src/messages/piksi.rs @@ -60,6 +60,7 @@ pub mod latency { /// measurement of the end-to-end communication latency in the system. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct Latency { /// Average latency @@ -117,6 +118,7 @@ pub mod msg_almanac { /// the Piksi's flash memory from the host. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgAlmanac { /// The message sender_id @@ -183,6 +185,7 @@ pub mod msg_cell_modem_status { /// parameters. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgCellModemStatus { /// The message sender_id @@ -271,6 +274,7 @@ pub mod msg_command_output { /// the correct command. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgCommandOutput { /// The message sender_id @@ -351,6 +355,7 @@ pub mod msg_command_req { /// MSG_COMMAND_RESP. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgCommandReq { /// The message sender_id @@ -430,6 +435,7 @@ pub mod msg_command_resp { /// return code of zero indicates success. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgCommandResp { /// The message sender_id @@ -509,6 +515,7 @@ pub mod msg_cw_results { /// future release. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgCwResults { /// The message sender_id @@ -575,6 +582,7 @@ pub mod msg_cw_start { /// future release. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgCwStart { /// The message sender_id @@ -641,6 +649,7 @@ pub mod msg_device_monitor { /// available. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgDeviceMonitor { /// The message sender_id @@ -747,6 +756,7 @@ pub mod msg_front_end_gain { /// an error for the particular gain stage as reported by the frontend. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgFrontEndGain { /// The message sender_id @@ -826,6 +836,7 @@ pub mod msg_iar_state { /// differenced carrier-phase measurements from satellite observations. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgIarState { /// The message sender_id @@ -898,6 +909,7 @@ pub mod msg_init_base_dep { /// Deprecated /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgInitBaseDep { /// The message sender_id @@ -963,6 +975,7 @@ pub mod msg_mask_satellite { /// being used in various Piksi subsystems. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgMaskSatellite { /// The message sender_id @@ -1134,6 +1147,7 @@ pub mod msg_mask_satellite_dep { /// Deprecated. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgMaskSatelliteDep { /// The message sender_id @@ -1305,6 +1319,7 @@ pub mod msg_network_bandwidth_usage { /// The bandwidth usage, a list of usage by interface. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgNetworkBandwidthUsage { /// The message sender_id @@ -1378,6 +1393,7 @@ pub mod msg_network_state_req { /// MSG_NETWORK_STATE_RESP messages. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgNetworkStateReq { /// The message sender_id @@ -1443,6 +1459,7 @@ pub mod msg_network_state_resp { /// output of ifaddrs struct returned by getifaddrs in c. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgNetworkStateResp { /// The message sender_id @@ -1476,6 +1493,7 @@ pub mod msg_network_state_resp { impl MsgNetworkStateResp { /// Gets the `iff_multicast_supports_multicast` flag. + #[allow(clippy::identity_op)] pub fn iff_multicast_supports_multicast(&self) -> bool { ((self.flags >> 15) & 1) == 1 } @@ -1489,6 +1507,7 @@ pub mod msg_network_state_resp { } /// Gets the `iff_link2_per_link_layer_defined_bit` flag. + #[allow(clippy::identity_op)] pub fn iff_link2_per_link_layer_defined_bit(&self) -> bool { ((self.flags >> 14) & 1) == 1 } @@ -1502,6 +1521,7 @@ pub mod msg_network_state_resp { } /// Gets the `iff_link1_per_link_layer_defined_bit` flag. + #[allow(clippy::identity_op)] pub fn iff_link1_per_link_layer_defined_bit(&self) -> bool { ((self.flags >> 13) & 1) == 1 } @@ -1515,6 +1535,7 @@ pub mod msg_network_state_resp { } /// Gets the `iff_link0_per_link_layer_defined_bit` flag. + #[allow(clippy::identity_op)] pub fn iff_link0_per_link_layer_defined_bit(&self) -> bool { ((self.flags >> 12) & 1) == 1 } @@ -1528,6 +1549,7 @@ pub mod msg_network_state_resp { } /// Gets the `iff_simplex_cant_hear_own_transmissions` flag. + #[allow(clippy::identity_op)] pub fn iff_simplex_cant_hear_own_transmissions(&self) -> bool { ((self.flags >> 11) & 1) == 1 } @@ -1541,6 +1563,7 @@ pub mod msg_network_state_resp { } /// Gets the `iff_oactive_transmission_in_progress` flag. + #[allow(clippy::identity_op)] pub fn iff_oactive_transmission_in_progress(&self) -> bool { ((self.flags >> 10) & 1) == 1 } @@ -1554,6 +1577,7 @@ pub mod msg_network_state_resp { } /// Gets the `iff_allmulti_receive_all_multicast_packets` flag. + #[allow(clippy::identity_op)] pub fn iff_allmulti_receive_all_multicast_packets(&self) -> bool { ((self.flags >> 9) & 1) == 1 } @@ -1567,6 +1591,7 @@ pub mod msg_network_state_resp { } /// Gets the `iff_promisc_receive_all_packets` flag. + #[allow(clippy::identity_op)] pub fn iff_promisc_receive_all_packets(&self) -> bool { ((self.flags >> 8) & 1) == 1 } @@ -1580,6 +1605,7 @@ pub mod msg_network_state_resp { } /// Gets the `iff_noarp_no_address_resolution_protocol` flag. + #[allow(clippy::identity_op)] pub fn iff_noarp_no_address_resolution_protocol(&self) -> bool { ((self.flags >> 7) & 1) == 1 } @@ -1593,6 +1619,7 @@ pub mod msg_network_state_resp { } /// Gets the `iff_running_resources_allocated` flag. + #[allow(clippy::identity_op)] pub fn iff_running_resources_allocated(&self) -> bool { ((self.flags >> 6) & 1) == 1 } @@ -1606,6 +1633,7 @@ pub mod msg_network_state_resp { } /// Gets the `iff_notrailers_avoid_use_of_trailers` flag. + #[allow(clippy::identity_op)] pub fn iff_notrailers_avoid_use_of_trailers(&self) -> bool { ((self.flags >> 5) & 1) == 1 } @@ -1619,6 +1647,7 @@ pub mod msg_network_state_resp { } /// Gets the `iff_pointopoint_interface_is_pointtopoint_link` flag. + #[allow(clippy::identity_op)] pub fn iff_pointopoint_interface_is_pointtopoint_link(&self) -> bool { ((self.flags >> 4) & 1) == 1 } @@ -1632,6 +1661,7 @@ pub mod msg_network_state_resp { } /// Gets the `iff_loopback_is_a_loopback_net` flag. + #[allow(clippy::identity_op)] pub fn iff_loopback_is_a_loopback_net(&self) -> bool { ((self.flags >> 3) & 1) == 1 } @@ -1642,6 +1672,7 @@ pub mod msg_network_state_resp { } /// Gets the `iff_debug_broadcast_address_valid` flag. + #[allow(clippy::identity_op)] pub fn iff_debug_broadcast_address_valid(&self) -> bool { ((self.flags >> 2) & 1) == 1 } @@ -1655,6 +1686,7 @@ pub mod msg_network_state_resp { } /// Gets the `iff_broadcast_broadcast_address_valid` flag. + #[allow(clippy::identity_op)] pub fn iff_broadcast_broadcast_address_valid(&self) -> bool { ((self.flags >> 1) & 1) == 1 } @@ -1668,6 +1700,7 @@ pub mod msg_network_state_resp { } /// Gets the `iff_up_interface_is_up` flag. + #[allow(clippy::identity_op)] pub fn iff_up_interface_is_up(&self) -> bool { ((self.flags >> 0) & 1) == 1 } @@ -1768,6 +1801,7 @@ pub mod msg_reset { /// This message from the host resets the Piksi back into the bootloader. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgReset { /// The message sender_id @@ -1888,6 +1922,7 @@ pub mod msg_reset_dep { /// This message from the host resets the Piksi back into the bootloader. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgResetDep { /// The message sender_id @@ -1953,6 +1988,7 @@ pub mod msg_reset_filters { /// Resolution (IAR) process. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgResetFilters { /// The message sender_id @@ -2080,6 +2116,7 @@ pub mod msg_set_time { /// sent by the host. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgSetTime { /// The message sender_id @@ -2144,6 +2181,7 @@ pub mod msg_specan { /// Spectrum analyzer packet. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgSpecan { /// The message sender_id @@ -2258,6 +2296,7 @@ pub mod msg_specan_dep { /// Deprecated. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgSpecanDep { /// The message sender_id @@ -2374,6 +2413,7 @@ pub mod msg_thread_state { /// percentage values must be normalized. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgThreadState { /// The message sender_id @@ -2468,6 +2508,7 @@ pub mod msg_uart_state { /// likelihood of transmission. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgUartState { /// The message sender_id @@ -2568,6 +2609,7 @@ pub mod msg_uart_state_depa { /// Deprecated /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgUartStateDepa { /// The message sender_id @@ -2665,6 +2707,7 @@ pub mod network_usage { /// necessarily be populated with a value. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct NetworkUsage { /// Duration over which the measurement was collected @@ -2733,6 +2776,7 @@ pub mod period { /// outages. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct Period { /// Average period @@ -2790,6 +2834,7 @@ pub mod uart_channel { /// UART channel. The reported percentage values must be normalized. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct UARTChannel { /// UART transmit throughput diff --git a/rust/sbp/src/messages/sbas.rs b/rust/sbp/src/messages/sbas.rs index 5d19501cf0..7f8433cfe7 100644 --- a/rust/sbp/src/messages/sbas.rs +++ b/rust/sbp/src/messages/sbas.rs @@ -28,6 +28,7 @@ pub mod msg_sbas_raw { /// parity of the data block and sends only blocks that pass the check. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgSbasRaw { /// The message sender_id diff --git a/rust/sbp/src/messages/settings.rs b/rust/sbp/src/messages/settings.rs index 596cf33299..4f316bf587 100644 --- a/rust/sbp/src/messages/settings.rs +++ b/rust/sbp/src/messages/settings.rs @@ -60,6 +60,7 @@ pub mod msg_settings_read_by_index_done { /// The settings message for indicating end of the settings values. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgSettingsReadByIndexDone { /// The message sender_id @@ -124,6 +125,7 @@ pub mod msg_settings_read_by_index_req { /// will respond to this message with a "MSG_SETTINGS_READ_BY_INDEX_RESP". /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgSettingsReadByIndexReq { /// The message sender_id @@ -205,6 +207,7 @@ pub mod msg_settings_read_by_index_resp { /// "simulator\0enabled\0True\0enum:True,False\0". /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgSettingsReadByIndexResp { /// The message sender_id @@ -291,6 +294,7 @@ pub mod msg_settings_read_req { /// 0x00A5). /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgSettingsReadReq { /// The message sender_id @@ -368,6 +372,7 @@ pub mod msg_settings_read_resp { /// string that could be sent from device is "solution\0soln_freq\010\0". /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgSettingsReadResp { /// The message sender_id @@ -442,6 +447,7 @@ pub mod msg_settings_register { /// setting to set the initial value. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgSettingsRegister { /// The message sender_id @@ -517,6 +523,7 @@ pub mod msg_settings_register_resp { /// and had a different value. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgSettingsRegisterResp { /// The message sender_id @@ -665,6 +672,7 @@ pub mod msg_settings_save { /// configuration to its onboard flash memory file system. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgSettingsSave { /// The message sender_id @@ -734,6 +742,7 @@ pub mod msg_settings_write { /// "solution\0soln_freq\010\0". /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgSettingsWrite { /// The message sender_id @@ -812,6 +821,7 @@ pub mod msg_settings_write_resp { /// "solution\0soln_freq\010\0". /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgSettingsWriteResp { /// The message sender_id diff --git a/rust/sbp/src/messages/signing.rs b/rust/sbp/src/messages/signing.rs index c4f49975fa..79c4a0581c 100644 --- a/rust/sbp/src/messages/signing.rs +++ b/rust/sbp/src/messages/signing.rs @@ -25,6 +25,7 @@ pub mod msg_ed25519_certificate { use crate::messages::lib::*; /// ED25519 certificate, split over multiple messages #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgEd25519Certificate { /// The message sender_id @@ -109,6 +110,7 @@ pub mod msg_ed25519_signature { use crate::messages::lib::*; /// ED25519 signature for groups of RTCM messages #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgEd25519Signature { /// The message sender_id @@ -212,6 +214,7 @@ pub mod msg_ed25519_signature_dep { use crate::messages::lib::*; /// Deprecated #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgEd25519SignatureDep { /// The message sender_id diff --git a/rust/sbp/src/messages/solution_meta.rs b/rust/sbp/src/messages/solution_meta.rs index 53c84a95ab..fdb90105dc 100644 --- a/rust/sbp/src/messages/solution_meta.rs +++ b/rust/sbp/src/messages/solution_meta.rs @@ -33,6 +33,7 @@ pub mod gnss_input_type { /// Accessible through sol_in\[N\].flags in a MSG_SOLN_META. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct GnssInputType { /// flags that store all relevant info specific to this sensor type. @@ -125,6 +126,7 @@ pub mod imu_input_type { /// through sol_in\[N\].flags in a MSG_SOLN_META. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct ImuInputType { /// Instrument time, grade, and architecture for a sensor. @@ -325,6 +327,7 @@ pub mod msg_soln_meta { /// valid GNSS solution and its tow is not a TOM. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgSolnMeta { /// The message sender_id @@ -529,6 +532,7 @@ pub mod msg_soln_meta_dep_a { /// GNSS metadata. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgSolnMetaDepA { /// The message sender_id @@ -737,6 +741,7 @@ pub mod odo_input_type { /// Accessible through sol_in\[N\].flags in a MSG_SOLN_META. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct OdoInputType { /// Instrument ODO rate, grade, and quality. @@ -928,6 +933,7 @@ pub mod solution_input_type { /// this section. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct SolutionInputType { /// The type of sensor diff --git a/rust/sbp/src/messages/ssr.rs b/rust/sbp/src/messages/ssr.rs index ffd1008509..a04d42fbc4 100644 --- a/rust/sbp/src/messages/ssr.rs +++ b/rust/sbp/src/messages/ssr.rs @@ -58,6 +58,7 @@ pub mod bounds_header { use crate::messages::lib::*; /// Header for the Bounds messages #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct BoundsHeader { /// GNSS reference time of the bound @@ -122,6 +123,7 @@ pub mod code_biases_content { /// RTCMv3 MT 1059 / 1065. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct CodeBiasesContent { /// Signal encoded following RTCM specifications (DF380, DF381, DF382 and @@ -159,6 +161,7 @@ pub mod code_phase_biases_sat_sig { use crate::messages::lib::*; /// Code and Phase Biases Bounds per Satellite-Signal couple #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct CodePhaseBiasesSatSig { /// Satellite ID. Similar to either RTCM DF068 (GPS), DF252 (Galileo), or @@ -232,6 +235,7 @@ pub mod grid_definition_header_dep_a { /// RLE encoded validity list. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct GridDefinitionHeaderDepA { /// region_size (deg) = 10 / region_size_inverse 0 is an invalid value. @@ -305,6 +309,7 @@ pub mod gridded_correction_header { /// supported in SBP, so each grid point will be identified by the index. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct GriddedCorrectionHeader { /// Unique identifier of the tile set this tile belongs to. @@ -392,6 +397,7 @@ pub mod gridded_correction_header_dep_a { /// supported in SBP, so each grid point will be identified by the index. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct GriddedCorrectionHeaderDepA { /// GNSS reference time of the correction @@ -466,6 +472,7 @@ pub mod msg_ssr_code_biases { /// the 1059 / 1065 RTCM message types. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgSsrCodeBiases { /// The message sender_id @@ -564,6 +571,7 @@ pub mod msg_ssr_code_phase_biases_bounds { use crate::messages::lib::*; /// Combined Code and Phase Biases Bounds #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgSsrCodePhaseBiasesBounds { /// The message sender_id @@ -666,6 +674,7 @@ pub mod msg_ssr_gridded_correction { /// It is typically equivalent to the QZSS CLAS Sub Type 9 messages. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgSsrGriddedCorrection { /// The message sender_id @@ -760,6 +769,7 @@ pub mod msg_ssr_gridded_correction_bounds { /// mean=2+0.1(i-200); i>230, mean=5+0.5(i-230). /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgSsrGriddedCorrectionBounds { /// The message sender_id @@ -913,6 +923,7 @@ pub mod msg_ssr_gridded_correction_dep_a { use crate::messages::lib::*; /// Deprecated #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgSsrGriddedCorrectionDepA { /// The message sender_id @@ -1002,6 +1013,7 @@ pub mod msg_ssr_gridded_correction_no_std_dep_a { use crate::messages::lib::*; /// Deprecated #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgSsrGriddedCorrectionNoStdDepA { /// The message sender_id @@ -1091,6 +1103,7 @@ pub mod msg_ssr_grid_definition_dep_a { use crate::messages::lib::*; /// Deprecated #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgSsrGridDefinitionDepA { /// The message sender_id @@ -1174,6 +1187,7 @@ pub mod msg_ssr_orbit_clock { /// RTCM message types. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgSsrOrbitClock { /// The message sender_id @@ -1343,6 +1357,7 @@ pub mod msg_ssr_orbit_clock_bounds { /// i>230, std=5+0.5(i-230). /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgSsrOrbitClockBounds { /// The message sender_id @@ -1439,6 +1454,7 @@ pub mod msg_ssr_orbit_clock_bounds_degradation { use crate::messages::lib::*; /// Combined Orbit and Clock Bound Degradation Parameter #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgSsrOrbitClockBoundsDegradation { /// The message sender_id @@ -1537,6 +1553,7 @@ pub mod msg_ssr_orbit_clock_dep_a { use crate::messages::lib::*; /// Deprecated #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgSsrOrbitClockDepA { /// The message sender_id @@ -1706,6 +1723,7 @@ pub mod msg_ssr_phase_biases { /// RTCM message types. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgSsrPhaseBiases { /// The message sender_id @@ -1832,6 +1850,7 @@ pub mod msg_ssr_satellite_apc { use crate::messages::lib::*; /// Satellite antenna phase center corrections #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgSsrSatelliteApc { /// The message sender_id @@ -1900,6 +1919,7 @@ pub mod msg_ssr_stec_correction { use crate::messages::lib::*; /// STEC correction polynomial coefficients #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgSsrStecCorrection { /// The message sender_id @@ -2012,6 +2032,7 @@ pub mod msg_ssr_stec_correction_dep { /// It is typically equivalent to the QZSS CLAS Sub Type 8 messages. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgSsrStecCorrectionDep { /// The message sender_id @@ -2086,6 +2107,7 @@ pub mod msg_ssr_stec_correction_dep_a { use crate::messages::lib::*; /// Deprecated #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgSsrStecCorrectionDepA { /// The message sender_id @@ -2171,6 +2193,7 @@ pub mod msg_ssr_tile_definition { /// correction points, not lists of points. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgSsrTileDefinition { /// The message sender_id @@ -2350,6 +2373,7 @@ pub mod msg_ssr_tile_definition_dep { /// correction points, not lists of points. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgSsrTileDefinitionDep { /// The message sender_id @@ -2515,6 +2539,7 @@ pub mod orbit_clock_bound { /// Orbit and clock bound. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct OrbitClockBound { /// Satellite ID. Similar to either RTCM DF068 (GPS), DF252 (Galileo), or @@ -2607,6 +2632,7 @@ pub mod orbit_clock_bound_degradation { /// Orbit and clock bound degradation. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct OrbitClockBoundDegradation { /// Orbit Bound Mean Radial First derivative. Range: 0-0.255 m/s @@ -2694,6 +2720,7 @@ pub mod phase_biases_content { /// Phase biases are to be added to carrier phase measurements. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct PhaseBiasesContent { /// Signal encoded following RTCM specifications (DF380, DF381, DF382 and @@ -2761,6 +2788,7 @@ pub mod stec_header { /// multiple SBP messages into a sequence. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct STECHeader { /// Unique identifier of the tile set this tile belongs to. @@ -2841,6 +2869,7 @@ pub mod stec_header_dep_a { /// multiple SBP messages into a sequence. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct STECHeaderDepA { /// GNSS reference time of the correction @@ -2906,6 +2935,7 @@ pub mod stec_residual { /// grid point. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct STECResidual { /// space vehicle identifier @@ -2956,6 +2986,7 @@ pub mod stec_residual_no_std { /// STEC residual for the given satellite at the grid point. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct STECResidualNoStd { /// space vehicle identifier @@ -2996,6 +3027,7 @@ pub mod stec_sat_element { /// STEC polynomial for the given satellite. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct STECSatElement { /// Unique space vehicle identifier @@ -3047,6 +3079,7 @@ pub mod stec_sat_element_integrity { /// STEC polynomial and bounds for the given satellite. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct STECSatElementIntegrity { /// STEC residuals (mean, stddev) @@ -3111,6 +3144,7 @@ pub mod satellite_apc { /// signal on a satellite. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct SatelliteAPC { /// GNSS signal identifier (16 bit) @@ -3314,6 +3348,7 @@ pub mod tropospheric_delay_correction { /// point. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct TroposphericDelayCorrection { /// Hydrostatic vertical delay. Add 2.3 m to get actual value. @@ -3364,6 +3399,7 @@ pub mod tropospheric_delay_correction_no_std { /// Troposphere vertical delays at the grid point. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct TroposphericDelayCorrectionNoStd { /// Hydrostatic vertical delay diff --git a/rust/sbp/src/messages/system.rs b/rust/sbp/src/messages/system.rs index 396284e73f..222938ebc0 100644 --- a/rust/sbp/src/messages/system.rs +++ b/rust/sbp/src/messages/system.rs @@ -42,6 +42,7 @@ pub mod msg_csac_telemetry { /// It is intended to be a low rate message for status purposes. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgCsacTelemetry { /// The message sender_id @@ -122,6 +123,7 @@ pub mod msg_csac_telemetry_labels { /// lower rate than the MSG_CSAC_TELEMETRY. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgCsacTelemetryLabels { /// The message sender_id @@ -202,6 +204,7 @@ pub mod msg_dgnss_status { /// corrections packet. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgDgnssStatus { /// The message sender_id @@ -347,6 +350,7 @@ pub mod msg_gnss_time_offset { /// messages) to GNSS time for the sender producing this message. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgGnssTimeOffset { /// The message sender_id @@ -441,6 +445,7 @@ pub mod msg_group_meta { /// Solution Group. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgGroupMeta { /// The message sender_id @@ -593,6 +598,7 @@ pub mod msg_heartbeat { /// flags should be inspected. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgHeartbeat { /// The message sender_id @@ -936,6 +942,7 @@ pub mod msg_ins_status { /// initialization of the inertial navigation system. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgInsStatus { /// The message sender_id @@ -1376,6 +1383,7 @@ pub mod msg_ins_updates { /// future as new types of measurements are being added. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgInsUpdates { /// The message sender_id @@ -1751,6 +1759,7 @@ pub mod msg_pps_time { /// should match the sender ID of the respective sensor data. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgPpsTime { /// The message sender_id @@ -1896,6 +1905,7 @@ pub mod msg_sensor_aid_event { /// anytime a sensor update is being processed. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgSensorAidEvent { /// The message sender_id @@ -2093,6 +2103,7 @@ pub mod msg_startup { /// ready to respond to commands or configuration requests. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgStartup { /// The message sender_id @@ -2279,6 +2290,7 @@ pub mod msg_status_journal { /// purposes. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgStatusJournal { /// The message sender_id @@ -2473,6 +2485,7 @@ pub mod msg_status_report { /// Refer to product documentation for details. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgStatusReport { /// The message sender_id @@ -2660,6 +2673,7 @@ pub mod status_journal_item { /// specific state should be ignored. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct StatusJournalItem { /// Milliseconds since system startup @@ -2700,6 +2714,7 @@ pub mod sub_system_report { /// state is reported as initializing, the specific state should be ignored. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct SubSystemReport { /// Identity of reporting subsystem diff --git a/rust/sbp/src/messages/tracking.rs b/rust/sbp/src/messages/tracking.rs index e65022cbff..edcdcc343a 100644 --- a/rust/sbp/src/messages/tracking.rs +++ b/rust/sbp/src/messages/tracking.rs @@ -43,6 +43,7 @@ pub mod msg_measurement_state { /// all tracked satellites. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgMeasurementState { /// The message sender_id @@ -116,6 +117,7 @@ pub mod msg_tracking_iq { /// update interval. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgTrackingIq { /// The message sender_id @@ -202,6 +204,7 @@ pub mod msg_tracking_iq_dep_a { /// Deprecated. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgTrackingIqDepA { /// The message sender_id @@ -289,6 +292,7 @@ pub mod msg_tracking_iq_dep_b { /// update interval. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgTrackingIqDepB { /// The message sender_id @@ -377,6 +381,7 @@ pub mod msg_tracking_state { /// all tracked satellites. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgTrackingState { /// The message sender_id @@ -449,6 +454,7 @@ pub mod msg_tracking_state_dep_a { /// Deprecated. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgTrackingStateDepA { /// The message sender_id @@ -521,6 +527,7 @@ pub mod msg_tracking_state_dep_b { /// Deprecated. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgTrackingStateDepB { /// The message sender_id @@ -593,6 +600,7 @@ pub mod msg_tracking_state_detailed_dep { /// Deprecated. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgTrackingStateDetailedDep { /// The message sender_id @@ -1610,6 +1618,7 @@ pub mod msg_tracking_state_detailed_dep_a { /// single tracking channel useful for debugging issues. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgTrackingStateDetailedDepA { /// The message sender_id @@ -2629,6 +2638,7 @@ pub mod measurement_state { /// 28). /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MeasurementState { /// Measurement Engine GNSS signal being tracked (carries either Glonass FCN @@ -2670,6 +2680,7 @@ pub mod tracking_channel_correlation { /// Structure containing in-phase and quadrature correlation components. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct TrackingChannelCorrelation { /// In-phase correlation @@ -2710,6 +2721,7 @@ pub mod tracking_channel_correlation_dep { /// Structure containing in-phase and quadrature correlation components. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct TrackingChannelCorrelationDep { /// In-phase correlation @@ -2751,6 +2763,7 @@ pub mod tracking_channel_state { /// power. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct TrackingChannelState { /// GNSS signal being tracked @@ -2798,6 +2811,7 @@ pub mod tracking_channel_state_dep_a { /// Deprecated. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct TrackingChannelStateDepA { /// Status of tracking channel @@ -2891,6 +2905,7 @@ pub mod tracking_channel_state_dep_b { /// Deprecated. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct TrackingChannelStateDepB { /// Status of tracking channel diff --git a/rust/sbp/src/messages/unknown.rs b/rust/sbp/src/messages/unknown.rs index 0b47aedea2..9787cedad6 100644 --- a/rust/sbp/src/messages/unknown.rs +++ b/rust/sbp/src/messages/unknown.rs @@ -6,7 +6,7 @@ use crate::{wire_format::WireFormat, SbpMessage}; /// The message returned by the parser when the message type does not correspond to a known message. #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] -#[derive(Debug, PartialEq, Clone)] +#[derive(Debug, Eq, PartialEq, Clone)] pub struct Unknown { /// The message id of the message. pub msg_id: u16, diff --git a/rust/sbp/src/messages/user.rs b/rust/sbp/src/messages/user.rs index 3fff513957..9af15b2dae 100644 --- a/rust/sbp/src/messages/user.rs +++ b/rust/sbp/src/messages/user.rs @@ -27,6 +27,7 @@ pub mod msg_user_data { /// maximum length of 255 bytes per message. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgUserData { /// The message sender_id diff --git a/rust/sbp/src/messages/vehicle.rs b/rust/sbp/src/messages/vehicle.rs index ae6745c935..d2a38ced7c 100644 --- a/rust/sbp/src/messages/vehicle.rs +++ b/rust/sbp/src/messages/vehicle.rs @@ -35,6 +35,7 @@ pub mod msg_odometry { /// shall roll over to zero after one week. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgOdometry { /// The message sender_id @@ -300,6 +301,7 @@ pub mod msg_wheeltick { /// with GNSS. Local CPU time shall roll over to zero after one week. /// #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Debug, PartialEq, Clone)] pub struct MsgWheeltick { /// The message sender_id diff --git a/rust/sbp/src/sbp_string.rs b/rust/sbp/src/sbp_string.rs index 18f2dd3fb3..94df3fa092 100644 --- a/rust/sbp/src/sbp_string.rs +++ b/rust/sbp/src/sbp_string.rs @@ -9,7 +9,7 @@ use serde::de::{Error, Visitor}; use crate::wire_format::WireFormat; /// Fixed or variable length string and its encoding. -#[derive(Debug, PartialEq, Clone)] +#[derive(Debug, Eq, PartialEq, Clone)] pub struct SbpString { data: T, encoding: PhantomData, @@ -303,7 +303,7 @@ macro_rules! forward_payload_vec { }; } -#[derive(Debug, PartialEq, Clone)] +#[derive(Debug, Eq, PartialEq, Clone)] pub struct MultipartError; impl std::error::Error for MultipartError {} @@ -314,7 +314,7 @@ impl std::fmt::Display for MultipartError { } } -#[derive(Debug, PartialEq, Clone)] +#[derive(Debug, Eq, PartialEq, Clone)] pub struct NullTerminatedError; impl std::error::Error for NullTerminatedError {} @@ -325,7 +325,7 @@ impl std::fmt::Display for NullTerminatedError { } } -#[derive(Debug, PartialEq, Clone)] +#[derive(Debug, Eq, PartialEq, Clone)] pub struct DoubleNullTerminatedError; impl std::error::Error for DoubleNullTerminatedError {} @@ -346,7 +346,7 @@ impl std::fmt::Display for DoubleNullTerminatedError { /// For example, the string "text" would be represented on the wire as /// /// text -#[derive(Debug, PartialEq, Clone, Copy)] +#[derive(Debug, Eq, PartialEq, Clone, Copy)] pub struct Unterminated; forward_payload_vec!(Unterminated, 0); @@ -360,7 +360,7 @@ forward_payload_vec!(Unterminated, 0); /// For example the string "text" would be represented on the wire as /// /// text\0 -#[derive(Debug, PartialEq, Clone, Copy)] +#[derive(Debug, Eq, PartialEq, Clone, Copy)] pub struct NullTerminated; forward_payload_vec!(NullTerminated, 1); @@ -379,7 +379,7 @@ forward_payload_vec!(NullTerminated, 1); /// /// A multipart string might contain no sections in which case on the wire it /// would consist of just a single NULL character. -#[derive(Debug, PartialEq, Clone, Copy)] +#[derive(Debug, Eq, PartialEq, Clone, Copy)] pub struct Multipart; forward_payload_vec!(Multipart, 0); @@ -402,7 +402,7 @@ forward_payload_vec!(Multipart, 0); /// A double NULL terminated string might contain no sections in which case on /// the wire it would consists of just two NULL terminators with no printable /// text. -#[derive(Debug, PartialEq, Clone, Copy)] +#[derive(Debug, Eq, PartialEq, Clone, Copy)] pub struct DoubleNullTerminated; forward_payload_vec!(DoubleNullTerminated, 2); From 9d8032f626b31c0905936207c439150bc246c9fe Mon Sep 17 00:00:00 2001 From: Jason Mobarak Date: Wed, 23 Nov 2022 10:20:41 +1100 Subject: [PATCH 3/9] clippy fixes --- rust/sbp/src/de.rs | 4 ++-- rust/sbp/src/link.rs | 6 +++--- rust/sbp/src/sbp_iter_ext.rs | 8 ++++---- rust/sbp2json/tests/common/mod.rs | 2 +- rust/sbp2json/tests/test_round_trips.rs | 10 +++++----- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/rust/sbp/src/de.rs b/rust/sbp/src/de.rs index 04a3046ba5..1eee1ca253 100644 --- a/rust/sbp/src/de.rs +++ b/rust/sbp/src/de.rs @@ -182,7 +182,7 @@ impl futures::Stream for Decoder { ) -> std::task::Poll> { let frame = match futures::ready!(std::pin::Pin::new(&mut self.0).poll_next(cx)) { Some(Ok(frame)) => frame, - Some(Err(e)) => return std::task::Poll::Ready(Some(Err(e.into()))), + Some(Err(e)) => return std::task::Poll::Ready(Some(Err(e))), None => return std::task::Poll::Ready(None), }; std::task::Poll::Ready(Some(frame.to_sbp())) @@ -346,7 +346,7 @@ impl futures::Stream for TimeoutDecoder { ) -> std::task::Poll> { match futures::ready!(std::pin::Pin::new(&mut self.0).poll_next(cx)) { Some(Ok(frame)) => std::task::Poll::Ready(Some(frame.to_sbp())), - Some(Err(e)) => std::task::Poll::Ready(Some(Err(e.into()))), + Some(Err(e)) => std::task::Poll::Ready(Some(Err(e))), None => std::task::Poll::Ready(None), } } diff --git a/rust/sbp/src/link.rs b/rust/sbp/src/link.rs index 739344f0f6..ddf3dbd4c7 100644 --- a/rust/sbp/src/link.rs +++ b/rust/sbp/src/link.rs @@ -49,7 +49,7 @@ where { let mut handlers = self.link.inner.handlers.lock().unwrap(); for handler in handlers.values_mut() { - if handler.can_run(&msg) { + if handler.can_run(msg) { handler.run(state, msg.clone()); sent = true; } @@ -58,7 +58,7 @@ where { let mut handlers = self.stateless_link.inner.handlers.lock().unwrap(); for handler in handlers.values_mut() { - if handler.can_run(&msg) { + if handler.can_run(msg) { handler.run(&(), msg.clone()); sent = true; } @@ -225,7 +225,7 @@ slotmap::new_key_type! { } /// Returned when registering a callback. Can be used to unregister the callback. -#[derive(Debug, Clone, Copy, PartialEq)] +#[derive(Debug, Clone, Copy, PartialEq, Eq)] pub struct Key { key: KeyInner, } diff --git a/rust/sbp/src/sbp_iter_ext.rs b/rust/sbp/src/sbp_iter_ext.rs index 06decc6152..c14c1dc097 100644 --- a/rust/sbp/src/sbp_iter_ext.rs +++ b/rust/sbp/src/sbp_iter_ext.rs @@ -232,17 +232,17 @@ mod tests { let mut with_time = iter_messages(data).ignore_errors().with_rover_time(); - let gps_time = with_time.next().map(|(_, t)| t).flatten().unwrap().unwrap(); + let gps_time = with_time.next().and_then(|(_, t)| t).unwrap().unwrap(); assert_eq!(gps_time.wn(), 1787); assert!((gps_time.tow() - 2567.8).abs() < f64::EPSILON); - assert!(with_time.next().map(|(_, t)| t).flatten().is_none()); + assert!(with_time.next().and_then(|(_, t)| t).is_none()); - let gps_time = with_time.next().map(|(_, t)| t).flatten().unwrap().unwrap(); + let gps_time = with_time.next().and_then(|(_, t)| t).unwrap().unwrap(); assert_eq!(gps_time.wn(), 1787); assert!((gps_time.tow() - 2567.9).abs() < f64::EPSILON); - let gps_time = with_time.next().map(|(_, t)| t).flatten().unwrap().unwrap(); + let gps_time = with_time.next().and_then(|(_, t)| t).unwrap().unwrap(); assert_eq!(gps_time.wn(), 1787); assert!((gps_time.tow() - 2568.).abs() < f64::EPSILON); } diff --git a/rust/sbp2json/tests/common/mod.rs b/rust/sbp2json/tests/common/mod.rs index 9018f8969a..8e52b711ca 100644 --- a/rust/sbp2json/tests/common/mod.rs +++ b/rust/sbp2json/tests/common/mod.rs @@ -65,7 +65,7 @@ pub fn find_project_root() -> Option { break; } } - return None; + None } pub struct DeleteTestOutput { diff --git a/rust/sbp2json/tests/test_round_trips.rs b/rust/sbp2json/tests/test_round_trips.rs index 9b1013601c..0675405e5e 100644 --- a/rust/sbp2json/tests/test_round_trips.rs +++ b/rust/sbp2json/tests/test_round_trips.rs @@ -43,7 +43,7 @@ fn test_continue_on_error() { #[test] fn test_sbp2json() { let tranform1 = |reader, writer| run_sbp2json(reader, writer, true); - let tranform2 = |reader, writer| run_json2sbp(reader, writer); + let tranform2 = run_json2sbp; test_round_trip( tranform1, @@ -57,7 +57,7 @@ fn test_sbp2json() { #[test] fn test_json2sbp() { - let tranform1 = |reader, writer| run_json2sbp(reader, writer); + let tranform1 = run_json2sbp; let tranform2 = |reader, writer| run_sbp2json(reader, writer, true); test_round_trip( @@ -72,7 +72,7 @@ fn test_json2sbp() { #[test] fn test_jsonfields2sbp() { - let tranform1 = |reader, writer| run_jsonfields2sbp(reader, writer); + let tranform1 = run_jsonfields2sbp; let tranform2 = |reader, writer| run_sbp2json(reader, writer, false); test_round_trip( @@ -87,8 +87,8 @@ fn test_jsonfields2sbp() { #[test] fn test_json2json() { - let tranform1 = |reader, writer| run_json2json(reader, writer); - let tranform2 = |reader, writer| run_json2sbp(reader, writer); + let tranform1 = run_json2json; + let tranform2 = run_json2sbp; let third_transform = ThirdTransform { transform: |reader, writer| run_sbp2json(reader, writer, true), From 197a56ddd168d2bf2e67b3d244fe60c14e73c329 Mon Sep 17 00:00:00 2001 From: Jason Mobarak Date: Wed, 23 Nov 2022 10:33:19 +1100 Subject: [PATCH 4/9] clippy allow excessive precision --- generator/sbpg/targets/resources/rust/test/sbp_tests_template.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/generator/sbpg/targets/resources/rust/test/sbp_tests_template.rs b/generator/sbpg/targets/resources/rust/test/sbp_tests_template.rs index 9e0ba38c97..97d7cce39b 100644 --- a/generator/sbpg/targets/resources/rust/test/sbp_tests_template.rs +++ b/generator/sbpg/targets/resources/rust/test/sbp_tests_template.rs @@ -23,6 +23,7 @@ assert_eq!(msg.(((prefix|snake_case))).to_string(), (((value|str_escape))), "inc ((*- elif value is float_type *))((= Note: the ("%.17e"|format(value)) filter is intended to preserve float literal precision accross all value ranges. =)) +#[allow(clippy::excessive_precision)] assert!(msg.(((prefix|snake_case))).almost_eq( ((("%.17e"|format(value)))) ), "incorrect value for (((prefix|snake_case))), expected ((("%.17e"|format(value)))), is {:e}", msg.(((prefix|snake_case)))); ((*- else *)) assert_eq!(msg.(((prefix|snake_case))), (((value))), "incorrect value for (((prefix|snake_case))), expected (((value))), is {}", msg.(((prefix|snake_case)))); From b4f8fe673675438f13c5edfc8fab5ff966d821aa Mon Sep 17 00:00:00 2001 From: Jason Mobarak Date: Tue, 22 Nov 2022 16:13:14 -0800 Subject: [PATCH 5/9] squelch clippy --- .../sbpg/targets/resources/rust/test/sbp_tests_main_template.rs | 2 ++ .../sbpg/targets/resources/rust/test/sbp_tests_template.rs | 1 - rust/sbp/tests/integration/main.rs | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/generator/sbpg/targets/resources/rust/test/sbp_tests_main_template.rs b/generator/sbpg/targets/resources/rust/test/sbp_tests_main_template.rs index eda1e714a6..41b47b7320 100644 --- a/generator/sbpg/targets/resources/rust/test/sbp_tests_main_template.rs +++ b/generator/sbpg/targets/resources/rust/test/sbp_tests_main_template.rs @@ -11,6 +11,8 @@ // This file was auto-generated. Do not modify by hand! +#![allow(clippy::excessive_precision)] + ((*- for test_name in test_names *)) mod (((test_name))); ((*- endfor *)) diff --git a/generator/sbpg/targets/resources/rust/test/sbp_tests_template.rs b/generator/sbpg/targets/resources/rust/test/sbp_tests_template.rs index 97d7cce39b..9e0ba38c97 100644 --- a/generator/sbpg/targets/resources/rust/test/sbp_tests_template.rs +++ b/generator/sbpg/targets/resources/rust/test/sbp_tests_template.rs @@ -23,7 +23,6 @@ assert_eq!(msg.(((prefix|snake_case))).to_string(), (((value|str_escape))), "inc ((*- elif value is float_type *))((= Note: the ("%.17e"|format(value)) filter is intended to preserve float literal precision accross all value ranges. =)) -#[allow(clippy::excessive_precision)] assert!(msg.(((prefix|snake_case))).almost_eq( ((("%.17e"|format(value)))) ), "incorrect value for (((prefix|snake_case))), expected ((("%.17e"|format(value)))), is {:e}", msg.(((prefix|snake_case)))); ((*- else *)) assert_eq!(msg.(((prefix|snake_case))), (((value))), "incorrect value for (((prefix|snake_case))), expected (((value))), is {}", msg.(((prefix|snake_case)))); diff --git a/rust/sbp/tests/integration/main.rs b/rust/sbp/tests/integration/main.rs index d883296a15..22cdb1e432 100644 --- a/rust/sbp/tests/integration/main.rs +++ b/rust/sbp/tests/integration/main.rs @@ -10,6 +10,8 @@ // WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. // This file was auto-generated. Do not modify by hand! + +#![allow(clippy::excessive_precision)] mod auto_check_sbp_acquisition_msg_acq_result_dep_a; mod auto_check_sbp_acquisition_msg_acq_result_dep_b; mod auto_check_sbp_acquisition_msg_acq_result_dep_c; From be3ba71bf2c3a6a167fde393f93ea7582dbb4f4a Mon Sep 17 00:00:00 2001 From: Jason Mobarak Date: Tue, 22 Nov 2022 16:19:20 -0800 Subject: [PATCH 6/9] clippy fixes --- rust/sbp/src/sbp_string.rs | 4 ++-- rust/sbp2json/tests/common/mod.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rust/sbp/src/sbp_string.rs b/rust/sbp/src/sbp_string.rs index 94df3fa092..75d5078fbd 100644 --- a/rust/sbp/src/sbp_string.rs +++ b/rust/sbp/src/sbp_string.rs @@ -487,7 +487,7 @@ mod tests { // Auto generate alternating bytes [`from_parts`] section // ----- let parts = ["a", "b", "c"]; - let multipart = SbpString::<_, Multipart>::from_parts(&parts); + let multipart = SbpString::<_, Multipart>::from_parts(parts); assert_eq!(multipart.data, null); // Test [`parts`] section @@ -525,7 +525,7 @@ mod tests { // Auto generate alternating bytes [`from_parts`] section // ----- let parts = ["a", "b", "c"]; - let double_null = SbpString::<_, DoubleNullTerminated>::from_parts(&parts); + let double_null = SbpString::<_, DoubleNullTerminated>::from_parts(parts); assert_eq!(double_null.data, data); // Test [`parts`] section diff --git a/rust/sbp2json/tests/common/mod.rs b/rust/sbp2json/tests/common/mod.rs index 8e52b711ca..8cafb38916 100644 --- a/rust/sbp2json/tests/common/mod.rs +++ b/rust/sbp2json/tests/common/mod.rs @@ -194,8 +194,8 @@ fn file_equals>(input: P, output: P, json: bool) -> bool { eprintln!("input: {:?}, output: {:?}", &input_path, &output_path); - let input_file = File::open(&input_path).unwrap(); - let output_file = File::open(&output_path).unwrap(); + let input_file = File::open(input_path).unwrap(); + let output_file = File::open(output_path).unwrap(); if json { json_file_equals(input_file, output_file) From 4a2953259bf5dcc638b1e0a46d5cf2519f0f548f Mon Sep 17 00:00:00 2001 From: Jason Mobarak Date: Tue, 22 Nov 2022 16:28:20 -0800 Subject: [PATCH 7/9] more clippy --- generator/sbpg/targets/test_rust.py | 2 +- ..._bootload_msg_bootloader_handshake_resp.rs | 18 +-- .../auto_check_sbp_logging_msg_log.rs | 12 +- .../auto_check_sbp_logging_msg_print_dep.rs | 108 ++++++------------ ...bp_navigation_msg_reference_frame_param.rs | Bin 19994 -> 19850 bytes ...k_sbp_piksi_msg_network_bandwidth_usage.rs | Bin 27018 -> 26658 bytes .../auto_check_sbp_piksi_msg_thread_state.rs | Bin 75383 -> 74591 bytes ...ettings_msg_settings_read_by_index_resp.rs | Bin 34630 -> 34120 bytes .../auto_check_sbp_system_msg_dgnss_status.rs | 12 +- 9 files changed, 55 insertions(+), 97 deletions(-) diff --git a/generator/sbpg/targets/test_rust.py b/generator/sbpg/targets/test_rust.py index 536a926322..16ee2d03ce 100644 --- a/generator/sbpg/targets/test_rust.py +++ b/generator/sbpg/targets/test_rust.py @@ -23,7 +23,7 @@ TEST_MAIN_TEMPLATE_NAME = "rust/test/sbp_tests_main_template.rs" def str_escape(value): - return "\"{}\".to_string()".format(value) + return "\"{}\"".format(value) def mod_name(value): return value.split('.')[1] diff --git a/rust/sbp/tests/integration/auto_check_sbp_bootload_msg_bootloader_handshake_resp.rs b/rust/sbp/tests/integration/auto_check_sbp_bootload_msg_bootloader_handshake_resp.rs index b2781096b8..18a680afea 100644 --- a/rust/sbp/tests/integration/auto_check_sbp_bootload_msg_bootloader_handshake_resp.rs +++ b/rust/sbp/tests/integration/auto_check_sbp_bootload_msg_bootloader_handshake_resp.rs @@ -54,12 +54,10 @@ fn test_auto_check_sbp_bootload_msg_bootloader_handshake_resp() { assert_eq!( msg.version.to_string(), "v1.2 -" - .to_string(), +", "incorrect value for msg.version, expected string '{}', is '{}'", "v1.2 -" - .to_string(), +", msg.version ); } @@ -173,12 +171,10 @@ fn test_json2sbp_auto_check_sbp_bootload_msg_bootloader_handshake_resp() { assert_eq!( msg.version.to_string(), "v1.2 -" - .to_string(), +", "incorrect value for msg.version, expected string '{}', is '{}'", "v1.2 -" - .to_string(), +", msg.version ); } @@ -308,12 +304,10 @@ fn test_sbp2json_auto_check_sbp_bootload_msg_bootloader_handshake_resp() { assert_eq!( msg.version.to_string(), "v1.2 -" - .to_string(), +", "incorrect value for msg.version, expected string '{}', is '{}'", "v1.2 -" - .to_string(), +", msg.version ); } diff --git a/rust/sbp/tests/integration/auto_check_sbp_logging_msg_log.rs b/rust/sbp/tests/integration/auto_check_sbp_logging_msg_log.rs index 88ffb00f56..60f3655255 100644 --- a/rust/sbp/tests/integration/auto_check_sbp_logging_msg_log.rs +++ b/rust/sbp/tests/integration/auto_check_sbp_logging_msg_log.rs @@ -55,9 +55,9 @@ fn test_auto_check_sbp_logging_msg_log() { ); assert_eq!( msg.text.to_string(), - "Filtered all obs from 2314 at tow 83.539019".to_string(), + "Filtered all obs from 2314 at tow 83.539019", "incorrect value for msg.text, expected string '{}', is '{}'", - "Filtered all obs from 2314 at tow 83.539019".to_string(), + "Filtered all obs from 2314 at tow 83.539019", msg.text ); } @@ -120,9 +120,9 @@ fn test_json2sbp_auto_check_sbp_logging_msg_log() { ); assert_eq!( msg.text.to_string(), - "Filtered all obs from 2314 at tow 83.539019".to_string(), + "Filtered all obs from 2314 at tow 83.539019", "incorrect value for msg.text, expected string '{}', is '{}'", - "Filtered all obs from 2314 at tow 83.539019".to_string(), + "Filtered all obs from 2314 at tow 83.539019", msg.text ); } @@ -194,9 +194,9 @@ fn test_sbp2json_auto_check_sbp_logging_msg_log() { ); assert_eq!( msg.text.to_string(), - "Filtered all obs from 2314 at tow 83.539019".to_string(), + "Filtered all obs from 2314 at tow 83.539019", "incorrect value for msg.text, expected string '{}', is '{}'", - "Filtered all obs from 2314 at tow 83.539019".to_string(), + "Filtered all obs from 2314 at tow 83.539019", msg.text ); } diff --git a/rust/sbp/tests/integration/auto_check_sbp_logging_msg_print_dep.rs b/rust/sbp/tests/integration/auto_check_sbp_logging_msg_print_dep.rs index 1d76cea9e9..d505978cce 100644 --- a/rust/sbp/tests/integration/auto_check_sbp_logging_msg_print_dep.rs +++ b/rust/sbp/tests/integration/auto_check_sbp_logging_msg_print_dep.rs @@ -51,12 +51,10 @@ fn test_auto_check_sbp_logging_msg_print_dep() { assert_eq!( msg.text.to_string(), "INFO: acq: PRN 15 found @ -2497 Hz, 20 SNR -" - .to_string(), +", "incorrect value for msg.text, expected string '{}', is '{}'", "INFO: acq: PRN 15 found @ -2497 Hz, 20 SNR -" - .to_string(), +", msg.text ); } @@ -96,12 +94,10 @@ fn test_auto_check_sbp_logging_msg_print_dep() { assert_eq!( msg.text.to_string(), "INFO: acq: PRN 31 found @ 4245 Hz, 21 SNR -" - .to_string(), +", "incorrect value for msg.text, expected string '{}', is '{}'", "INFO: acq: PRN 31 found @ 4245 Hz, 21 SNR -" - .to_string(), +", msg.text ); } @@ -141,12 +137,10 @@ fn test_auto_check_sbp_logging_msg_print_dep() { assert_eq!( msg.text.to_string(), "INFO: Disabling channel 0 (PRN 11) -" - .to_string(), +", "incorrect value for msg.text, expected string '{}', is '{}'", "INFO: Disabling channel 0 (PRN 11) -" - .to_string(), +", msg.text ); } @@ -186,12 +180,10 @@ fn test_auto_check_sbp_logging_msg_print_dep() { assert_eq!( msg.text.to_string(), "INFO: acq: PRN 2 found @ 3996 Hz, 20 SNR -" - .to_string(), +", "incorrect value for msg.text, expected string '{}', is '{}'", "INFO: acq: PRN 2 found @ 3996 Hz, 20 SNR -" - .to_string(), +", msg.text ); } @@ -231,12 +223,10 @@ fn test_auto_check_sbp_logging_msg_print_dep() { assert_eq!( msg.text.to_string(), "INFO: acq: PRN 4 found @ -7492 Hz, 20 SNR -" - .to_string(), +", "incorrect value for msg.text, expected string '{}', is '{}'", "INFO: acq: PRN 4 found @ -7492 Hz, 20 SNR -" - .to_string(), +", msg.text ); } @@ -276,12 +266,10 @@ fn test_auto_check_sbp_logging_msg_print_dep() { assert_eq!( msg.text.to_string(), "INFO: Disabling channel 1 (PRN 15) -" - .to_string(), +", "incorrect value for msg.text, expected string '{}', is '{}'", "INFO: Disabling channel 1 (PRN 15) -" - .to_string(), +", msg.text ); } @@ -340,12 +328,10 @@ fn test_json2sbp_auto_check_sbp_logging_msg_print_dep() { assert_eq!( msg.text.to_string(), "INFO: acq: PRN 15 found @ -2497 Hz, 20 SNR -" - .to_string(), +", "incorrect value for msg.text, expected string '{}', is '{}'", "INFO: acq: PRN 15 found @ -2497 Hz, 20 SNR -" - .to_string(), +", msg.text ); } @@ -390,12 +376,10 @@ fn test_json2sbp_auto_check_sbp_logging_msg_print_dep() { assert_eq!( msg.text.to_string(), "INFO: acq: PRN 31 found @ 4245 Hz, 21 SNR -" - .to_string(), +", "incorrect value for msg.text, expected string '{}', is '{}'", "INFO: acq: PRN 31 found @ 4245 Hz, 21 SNR -" - .to_string(), +", msg.text ); } @@ -440,12 +424,10 @@ fn test_json2sbp_auto_check_sbp_logging_msg_print_dep() { assert_eq!( msg.text.to_string(), "INFO: Disabling channel 0 (PRN 11) -" - .to_string(), +", "incorrect value for msg.text, expected string '{}', is '{}'", "INFO: Disabling channel 0 (PRN 11) -" - .to_string(), +", msg.text ); } @@ -490,12 +472,10 @@ fn test_json2sbp_auto_check_sbp_logging_msg_print_dep() { assert_eq!( msg.text.to_string(), "INFO: acq: PRN 2 found @ 3996 Hz, 20 SNR -" - .to_string(), +", "incorrect value for msg.text, expected string '{}', is '{}'", "INFO: acq: PRN 2 found @ 3996 Hz, 20 SNR -" - .to_string(), +", msg.text ); } @@ -540,12 +520,10 @@ fn test_json2sbp_auto_check_sbp_logging_msg_print_dep() { assert_eq!( msg.text.to_string(), "INFO: acq: PRN 4 found @ -7492 Hz, 20 SNR -" - .to_string(), +", "incorrect value for msg.text, expected string '{}', is '{}'", "INFO: acq: PRN 4 found @ -7492 Hz, 20 SNR -" - .to_string(), +", msg.text ); } @@ -590,12 +568,10 @@ fn test_json2sbp_auto_check_sbp_logging_msg_print_dep() { assert_eq!( msg.text.to_string(), "INFO: Disabling channel 1 (PRN 15) -" - .to_string(), +", "incorrect value for msg.text, expected string '{}', is '{}'", "INFO: Disabling channel 1 (PRN 15) -" - .to_string(), +", msg.text ); } @@ -663,12 +639,10 @@ fn test_sbp2json_auto_check_sbp_logging_msg_print_dep() { assert_eq!( msg.text.to_string(), "INFO: acq: PRN 15 found @ -2497 Hz, 20 SNR -" - .to_string(), +", "incorrect value for msg.text, expected string '{}', is '{}'", "INFO: acq: PRN 15 found @ -2497 Hz, 20 SNR -" - .to_string(), +", msg.text ); } @@ -727,12 +701,10 @@ fn test_sbp2json_auto_check_sbp_logging_msg_print_dep() { assert_eq!( msg.text.to_string(), "INFO: acq: PRN 31 found @ 4245 Hz, 21 SNR -" - .to_string(), +", "incorrect value for msg.text, expected string '{}', is '{}'", "INFO: acq: PRN 31 found @ 4245 Hz, 21 SNR -" - .to_string(), +", msg.text ); } @@ -791,12 +763,10 @@ fn test_sbp2json_auto_check_sbp_logging_msg_print_dep() { assert_eq!( msg.text.to_string(), "INFO: Disabling channel 0 (PRN 11) -" - .to_string(), +", "incorrect value for msg.text, expected string '{}', is '{}'", "INFO: Disabling channel 0 (PRN 11) -" - .to_string(), +", msg.text ); } @@ -855,12 +825,10 @@ fn test_sbp2json_auto_check_sbp_logging_msg_print_dep() { assert_eq!( msg.text.to_string(), "INFO: acq: PRN 2 found @ 3996 Hz, 20 SNR -" - .to_string(), +", "incorrect value for msg.text, expected string '{}', is '{}'", "INFO: acq: PRN 2 found @ 3996 Hz, 20 SNR -" - .to_string(), +", msg.text ); } @@ -919,12 +887,10 @@ fn test_sbp2json_auto_check_sbp_logging_msg_print_dep() { assert_eq!( msg.text.to_string(), "INFO: acq: PRN 4 found @ -7492 Hz, 20 SNR -" - .to_string(), +", "incorrect value for msg.text, expected string '{}', is '{}'", "INFO: acq: PRN 4 found @ -7492 Hz, 20 SNR -" - .to_string(), +", msg.text ); } @@ -983,12 +949,10 @@ fn test_sbp2json_auto_check_sbp_logging_msg_print_dep() { assert_eq!( msg.text.to_string(), "INFO: Disabling channel 1 (PRN 15) -" - .to_string(), +", "incorrect value for msg.text, expected string '{}', is '{}'", "INFO: Disabling channel 1 (PRN 15) -" - .to_string(), +", msg.text ); } diff --git a/rust/sbp/tests/integration/auto_check_sbp_navigation_msg_reference_frame_param.rs b/rust/sbp/tests/integration/auto_check_sbp_navigation_msg_reference_frame_param.rs index 1b9d62f6594abf1cf1d44ebc071e67104d4923f0..5a1e00914ea6b6dc36e2f7396009aa17c527ea6e 100644 GIT binary patch delta 145 zcmbO=hp}rm8aGP- delta 166 zcmeC0%{Xfg5+k8-^NG&Me$d2^E6I$C;R IVd_g}0Bku}n*aa+ delta 752 zcmZ2#m%p0J^i#j31W1e$TYI$aUQajPSWBt;_(> C9{cnF diff --git a/rust/sbp/tests/integration/auto_check_sbp_piksi_msg_thread_state.rs b/rust/sbp/tests/integration/auto_check_sbp_piksi_msg_thread_state.rs index cb87708b0fc374b64492414e888ecebc9a3975cf..5489cef27c243dda80ca1b5f3613a306584374d6 100644 GIT binary patch delta 1102 zcmZvaOK1~O6o#2P)ue?Q8*F@2cWz>ZA_Z-6C0I12IuuOs5fGucFv&&;p{Vt-5Yg(d zL=lrBqJoc(oJciTB*k`7gHl9rqtzl}Nr#SB>8^O^ac6FtZ14Tg`M>j@vrv?$#%1-W z2aQSqYM~d?Ti21#JG$I{P!QX`+IWP|dl2#B3Y-d(xlD`o@CgX73Yh?4D^d`R)qF0-b%XWDWqBDNmCyZ3TZmXZ*P3ao*x>JK_ z>vMeAKZ$Rb{30!DAHmpsiGk&qxB=OJ=gk6&w%(Q;y2>$flx-X5{t9e-=z%cBIu2Eg zklwLM(rl9^ga53H)&7*nAkGm%aA;1Lqlp$nFSub31`jv`(}?oND-K1`Bm4MHs;xlA zK%$HE-Uk+@T5$MT{GAdFBx+Zf{e&G*Ci&5NR0|?zm{R>3|KJfN<=q;x%3lk%XPNkRk zcz*n*cS}(Je#h0k4{PhsQTOa88H=X~rzd_@yAp~Q-|-e=x=x!0YW}QM41i2hvwhZB zSKc|Dtu}yh<+DsVm)18(9(>)BVn`>r(%A!z%@`;S%2H-0Trwbs8RP4KCegnsk0wpJ|w-_NeIdKlu7LrC3Qg_*1cO!;~2xjA|Tx@{G% z{cEFIOcowVFyzRg+<``Z*z=MP3V|zj%m&>6i_f+&VwDDQ?DkVChU705MRray6j6h6 zLh1ej|LSuDVbOrweeWc0bD8%uWSg(45Vrf)p!i^)YZ)&j3t^PqA@R=)6;qx~TGJ5) zz0Y}Z4F0TJ$S|539Ap%%DZKW0@nWLjHy^`L)Q6=fpM;Bs6yuTIs~4zRDLT^q_##>o zO_~(Z6)VstEgr~D#pyn*EOkOO-HyYvA6T;p5J`Z-O;2%4QX26TJ_<)oNFcjw%5Yp+ zDu{D6EFZaa>TE}O8K^*q7W4`YnLajqGq3?HvIjThEL=_3q|59WmRm?U| z1*ty7Lo&Py;}2iqR<3BITN&^C$?sncl)NHFVc#H6+*1B%_h-Hro8edLKd()nP`P6=F?VUwi=C4hV-bcK`UGp}s^AQi(rd7i@$Bn^4!iZ{QP z^hcN|P?dqM0Bo&}q6R`yfkfcsb%Aoo3ODzu_mS+e%^wUK*^%6a?wNg?Z&>YPLsEe3 z_ Date: Tue, 22 Nov 2022 16:39:34 -0800 Subject: [PATCH 8/9] clippy lints --- rust/sbp/src/de.rs | 5 +---- rust/sbp/src/link.rs | 1 + rust/sbp2json/tests/common/mod.rs | 4 ++-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/rust/sbp/src/de.rs b/rust/sbp/src/de.rs index 1eee1ca253..e20951cc31 100644 --- a/rust/sbp/src/de.rs +++ b/rust/sbp/src/de.rs @@ -381,10 +381,7 @@ mod tests { let timeout_duration = Duration::from_secs(2); let now = Instant::now(); let mut messages = iter_messages_with_timeout(rdr, timeout_duration); - for msg in &mut messages { - assert!(matches!(msg, Err(Error::IoError(_)))); - break; - } + assert!(matches!(messages.next().unwrap(), Err(Error::IoError(_)))); assert!(now.elapsed() >= timeout_duration); } diff --git a/rust/sbp/src/link.rs b/rust/sbp/src/link.rs index ddf3dbd4c7..15b89c9118 100644 --- a/rust/sbp/src/link.rs +++ b/rust/sbp/src/link.rs @@ -142,6 +142,7 @@ struct LinkInner<'link, S> { } /// A message handler and the message ids it responds to. +#[allow(clippy::type_complexity)] pub struct Handler<'link, S> { func: Box, msg_types: Cow<'static, [u16]>, diff --git a/rust/sbp2json/tests/common/mod.rs b/rust/sbp2json/tests/common/mod.rs index 8cafb38916..2336422c1b 100644 --- a/rust/sbp2json/tests/common/mod.rs +++ b/rust/sbp2json/tests/common/mod.rs @@ -91,8 +91,8 @@ impl DeleteTestOutput { pub fn new() -> DeleteTestOutput { DeleteTestOutput { files: vec![] } } - pub fn add_test_output(&mut self, file_path: &PathBuf) { - self.files.push(file_path.clone()); + pub fn add_test_output(&mut self, file_path: &Path) { + self.files.push(file_path.to_path_buf()); } } From b97bd350ff02aa169bd2b9629946234b63a7d5c5 Mon Sep 17 00:00:00 2001 From: Jason Mobarak Date: Tue, 22 Nov 2022 16:54:56 -0800 Subject: [PATCH 9/9] clippy --- rust/sbp2json/tests/common/mod.rs | 2 ++ rust/sbp2json/tests/test_error.rs | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/rust/sbp2json/tests/common/mod.rs b/rust/sbp2json/tests/common/mod.rs index 68fbcd96ad..4e734c304c 100644 --- a/rust/sbp2json/tests/common/mod.rs +++ b/rust/sbp2json/tests/common/mod.rs @@ -1,3 +1,5 @@ +#![allow(dead_code)] + use std::{ env, fs::{self, File}, diff --git a/rust/sbp2json/tests/test_error.rs b/rust/sbp2json/tests/test_error.rs index 0a178e615d..444e552303 100644 --- a/rust/sbp2json/tests/test_error.rs +++ b/rust/sbp2json/tests/test_error.rs @@ -1,7 +1,6 @@ mod common; -use crate::common::{data_path, find_project_root}; -use assert_cmd::cargo::CommandCargoExt; +use crate::common::data_path; use assert_cmd::Command; /// Asserts termination of json decoder on broken inputs