Skip to content

Commit d2272ba

Browse files
committed
run linter
Signed-off-by: Guillaume W. Bres <guillaume.bressaix@gmail.com>
1 parent 2fc4d27 commit d2272ba

File tree

3 files changed

+77
-79
lines changed

3 files changed

+77
-79
lines changed

src/entry.rs

Lines changed: 76 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,13 @@ impl std::ops::Sub for SP3Entry {
5050
self.position_km.2 - rhs.position_km.2,
5151
),
5252
velocity_km_s: if let Some(velocity_km_s) = self.velocity_km_s {
53-
rhs.velocity_km_s.map(|rhs| (
53+
rhs.velocity_km_s.map(|rhs| {
54+
(
5455
velocity_km_s.0 - rhs.0,
5556
velocity_km_s.1 - rhs.1,
5657
velocity_km_s.2 - rhs.2,
57-
))
58+
)
59+
})
5860
} else {
5961
None
6062
},
@@ -320,18 +322,18 @@ mod test {
320322

321323
{
322324
let (data, expected) = (
323-
SP3Entry {
324-
position_km: (15402.861499, 21607.418873, -992.500669),
325-
velocity_km_s: None,
326-
orbit_prediction: false,
327-
maneuver: false,
328-
clock_drift_ns: None,
329-
clock_event: false,
330-
clock_prediction: false,
331-
clock_us: Some(10.571484),
332-
},
333-
"PG01 15402.861499 21607.418873 -992.500669 10.571484\n",
334-
);
325+
SP3Entry {
326+
position_km: (15402.861499, 21607.418873, -992.500669),
327+
velocity_km_s: None,
328+
orbit_prediction: false,
329+
maneuver: false,
330+
clock_drift_ns: None,
331+
clock_event: false,
332+
clock_prediction: false,
333+
clock_us: Some(10.571484),
334+
},
335+
"PG01 15402.861499 21607.418873 -992.500669 10.571484\n",
336+
);
335337
let mut buf = BufWriter::new(Utf8Buffer::new(1024));
336338

337339
data.format(g01, &mut buf).unwrap_or_else(|e| {
@@ -351,18 +353,18 @@ mod test {
351353

352354
{
353355
let (data, expected) = (
354-
SP3Entry {
355-
position_km: (15402.861499, 21607.418873, -992.500669),
356-
velocity_km_s: None,
357-
orbit_prediction: false,
358-
maneuver: false,
359-
clock_drift_ns: None,
360-
clock_event: false,
361-
clock_prediction: false,
362-
clock_us: None,
363-
},
364-
"PG01 15402.861499 21607.418873 -992.500669\n",
365-
);
356+
SP3Entry {
357+
position_km: (15402.861499, 21607.418873, -992.500669),
358+
velocity_km_s: None,
359+
orbit_prediction: false,
360+
maneuver: false,
361+
clock_drift_ns: None,
362+
clock_event: false,
363+
clock_prediction: false,
364+
clock_us: None,
365+
},
366+
"PG01 15402.861499 21607.418873 -992.500669\n",
367+
);
366368
let mut buf = BufWriter::new(Utf8Buffer::new(1024));
367369

368370
data.format(g01, &mut buf).unwrap_or_else(|e| {
@@ -382,18 +384,18 @@ mod test {
382384

383385
{
384386
let (data, expected) = (
385-
SP3Entry {
386-
position_km: (-12593.593500, 10170.327650, -20354.534400),
387-
velocity_km_s: None,
388-
orbit_prediction: false,
389-
maneuver: true,
390-
clock_drift_ns: None,
391-
clock_event: false,
392-
clock_prediction: false,
393-
clock_us: None,
394-
},
395-
"PG01 -12593.593500 10170.327650 -20354.534400 M\n",
396-
);
387+
SP3Entry {
388+
position_km: (-12593.593500, 10170.327650, -20354.534400),
389+
velocity_km_s: None,
390+
orbit_prediction: false,
391+
maneuver: true,
392+
clock_drift_ns: None,
393+
clock_event: false,
394+
clock_prediction: false,
395+
clock_us: None,
396+
},
397+
"PG01 -12593.593500 10170.327650 -20354.534400 M\n",
398+
);
397399
let mut buf = BufWriter::new(Utf8Buffer::new(1024));
398400

399401
data.format(g01, &mut buf).unwrap_or_else(|e| {
@@ -413,18 +415,18 @@ mod test {
413415

414416
{
415417
let (data, expected) = (
416-
SP3Entry {
417-
position_km: (-11044.805800, -10475.672350, 21929.418200),
418-
velocity_km_s: None,
419-
orbit_prediction: false,
420-
maneuver: false,
421-
clock_drift_ns: None,
422-
clock_event: false,
423-
clock_prediction: true,
424-
clock_us: None,
425-
},
426-
"PG01 -11044.805800 -10475.672350 21929.418200 P\n",
427-
);
418+
SP3Entry {
419+
position_km: (-11044.805800, -10475.672350, 21929.418200),
420+
velocity_km_s: None,
421+
orbit_prediction: false,
422+
maneuver: false,
423+
clock_drift_ns: None,
424+
clock_event: false,
425+
clock_prediction: true,
426+
clock_us: None,
427+
},
428+
"PG01 -11044.805800 -10475.672350 21929.418200 P\n",
429+
);
428430
let mut buf = BufWriter::new(Utf8Buffer::new(1024));
429431

430432
data.format(g01, &mut buf).unwrap_or_else(|e| {
@@ -506,19 +508,19 @@ mod test {
506508

507509
{
508510
let (data, expected) = (
509-
SP3Entry {
510-
position_km: (15402.861499, 21607.418873, -992.500669),
511-
velocity_km_s: Some((-22859.768469, -8524.538983, -15063.229095)),
512-
orbit_prediction: false,
513-
maneuver: false,
514-
clock_drift_ns: None,
515-
clock_event: false,
516-
clock_prediction: false,
517-
clock_us: None,
518-
},
519-
"PG01 15402.861499 21607.418873 -992.500669
511+
SP3Entry {
512+
position_km: (15402.861499, 21607.418873, -992.500669),
513+
velocity_km_s: Some((-22859.768469, -8524.538983, -15063.229095)),
514+
orbit_prediction: false,
515+
maneuver: false,
516+
clock_drift_ns: None,
517+
clock_event: false,
518+
clock_prediction: false,
519+
clock_us: None,
520+
},
521+
"PG01 15402.861499 21607.418873 -992.500669
520522
VG01 -22859.768469 -8524.538983 -15063.229095\n",
521-
);
523+
);
522524
let mut buf = BufWriter::new(Utf8Buffer::new(1024));
523525

524526
data.format(g01, &mut buf).unwrap_or_else(|e| {
@@ -538,19 +540,19 @@ VG01 -22859.768469 -8524.538983 -15063.229095\n",
538540

539541
{
540542
let (data, expected) = (
541-
SP3Entry {
542-
position_km: (15402.861499, 21607.418873, -992.500669),
543-
velocity_km_s: Some((-22859.768469, -8524.538983, -15063.229095)),
544-
orbit_prediction: false,
545-
maneuver: false,
546-
clock_drift_ns: Some(-3.292980),
547-
clock_event: false,
548-
clock_prediction: false,
549-
clock_us: None,
550-
},
551-
"PG01 15402.861499 21607.418873 -992.500669
543+
SP3Entry {
544+
position_km: (15402.861499, 21607.418873, -992.500669),
545+
velocity_km_s: Some((-22859.768469, -8524.538983, -15063.229095)),
546+
orbit_prediction: false,
547+
maneuver: false,
548+
clock_drift_ns: Some(-3.292980),
549+
clock_event: false,
550+
clock_prediction: false,
551+
clock_us: None,
552+
},
553+
"PG01 15402.861499 21607.418873 -992.500669
552554
VG01 -22859.768469 -8524.538983 -15063.229095 -3.292980\n",
553-
);
555+
);
554556
let mut buf = BufWriter::new(Utf8Buffer::new(1024));
555557

556558
data.format(g01, &mut buf).unwrap_or_else(|e| {

src/header/line2.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ impl std::str::FromStr for Line2 {
2121
return Err(ParsingError::MalformedH2);
2222
}
2323

24-
2524
let mut sow_nanos = (0_u32, 0_u64);
2625
let mut mjd = (0_u32, 0.0_f64);
2726

src/lib.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,7 @@ pub mod prelude {
7373
};
7474

7575
#[cfg(feature = "qc")]
76-
pub use gnss_qc_traits::{
77-
Merge,
78-
Timeshift,
79-
};
76+
pub use gnss_qc_traits::{Merge, Timeshift};
8077

8178
#[cfg(feature = "processing")]
8279
pub use gnss_qc_traits::Split;

0 commit comments

Comments
 (0)