Skip to content

Commit 36b6b51

Browse files
authored
Suppress some clippy warnings (#41)
1 parent c5c2425 commit 36b6b51

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

src/ephemeris.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ pub enum EphemerisTerms {
9696

9797
impl EphemerisTerms {
9898
/// Create new keplarian ephemeris terms from already decoded data
99+
#[allow(clippy::too_many_arguments)]
99100
pub fn new_kepler(
100101
constellation: Constellation,
101102
tgd: [f32; 2],
@@ -171,6 +172,7 @@ impl EphemerisTerms {
171172
}
172173

173174
/// Create new GLONASS ephemeris terms from already decoded data
175+
#[allow(clippy::too_many_arguments)]
174176
pub fn new_glo(
175177
gamma: f64,
176178
tau: f64,
@@ -199,6 +201,7 @@ pub struct Ephemeris(c_bindings::ephemeris_t);
199201

200202
impl Ephemeris {
201203
/// Create new ephemeris from already decoded data
204+
#[allow(clippy::too_many_arguments)]
202205
pub fn new(
203206
sid: crate::signal::GnssSignal,
204207
toe: crate::time::GpsTime,

src/ionosphere.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ impl Ionosphere {
3535
}
3636

3737
/// Construct an ionosphere model from already decoded parameters
38+
#[allow(clippy::too_many_arguments)]
3839
pub fn new(
3940
toa: GpsTime,
4041
a0: f64,

src/navmeas.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ impl NavigationMeasurement {
3737

3838
/// Gets the pseudorange measurement, if a valid one has been set
3939
pub fn get_pseudorange(&self) -> Option<f64> {
40-
if self.0.flags | NAV_MEAS_FLAG_CODE_VALID != 0 {
40+
if self.0.flags & NAV_MEAS_FLAG_CODE_VALID != 0 {
4141
Some(self.0.pseudorange)
4242
} else {
4343
None
@@ -59,7 +59,7 @@ impl NavigationMeasurement {
5959

6060
/// Gets the measured doppler measurement, if a valid one has been set
6161
pub fn get_measured_doppler(&self) -> Option<f64> {
62-
if self.0.flags | NAV_MEAS_FLAG_MEAS_DOPPLER_VALID != 0 {
62+
if self.0.flags & NAV_MEAS_FLAG_MEAS_DOPPLER_VALID != 0 {
6363
Some(self.0.measured_doppler)
6464
} else {
6565
None
@@ -92,7 +92,7 @@ impl NavigationMeasurement {
9292

9393
/// Gets the signal CN0 measurement, if a valid one has been set
9494
pub fn get_cn0(&self) -> Option<f64> {
95-
if self.0.flags | NAV_MEAS_FLAG_CN0_VALID != 0 {
95+
if self.0.flags & NAV_MEAS_FLAG_CN0_VALID != 0 {
9696
Some(self.0.cn0)
9797
} else {
9898
None

0 commit comments

Comments
 (0)