Skip to content

Commit 61c9d4a

Browse files
committed
Fix CI/CD issues: formatting and test compilation errors
- Run cargo fmt --all to fix formatting issues - Fix ground_station_oisl -> oisl import in topology_test.rs - Add missing DateTime and Duration imports in topology_test.rs - Add missing Duration import in scheduler/src/keyhole.rs - Remove unused HashMap import in scheduler/tests/drf_test.rs
1 parent 411d059 commit 61c9d4a

5 files changed

Lines changed: 6 additions & 11 deletions

File tree

oisl/src/mission/validator.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,8 @@ impl PlanValidator {
9696
let mut terminal_usage: HashMap<crate::TerminalId, usize> = HashMap::new();
9797

9898
for reservation in &plan.link_reservations {
99-
*terminal_usage
100-
.entry(reservation.terminal_a)
101-
.or_insert(0) += 1;
102-
*terminal_usage
103-
.entry(reservation.terminal_b)
104-
.or_insert(0) += 1;
99+
*terminal_usage.entry(reservation.terminal_a).or_insert(0) += 1;
100+
*terminal_usage.entry(reservation.terminal_b).or_insert(0) += 1;
105101
}
106102

107103
// Check for over-subscribed terminals

oisl/src/topology/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,3 @@ pub use link_state::{ActiveLink, LinkMetrics, LinkPhase, PhaseTransition};
2525
pub use control_node_placement::{
2626
ControlNodePlacementAlgorithm, PlacementError, PlacementEvaluation,
2727
};
28-

oisl/tests/topology_test.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
#[cfg(test)]
22
mod tests {
3-
use ground_station_oisl::topology::{
3+
use chrono::{DateTime, Duration};
4+
use oisl::topology::{
45
GraphSnapshot, NodeState, NodeType, Position3D, TopologyForecast, Velocity3D,
56
};
6-
use ground_station_oisl::{NodeId, TimeWindow};
7+
use oisl::{NodeId, TimeWindow};
78

89
#[test]
910
fn test_graph_snapshot_creation() {

scheduler/src/keyhole.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,7 @@ impl KeyholeWarning {
327327
#[cfg(test)]
328328
mod tests {
329329
use super::*;
330+
use chrono::Duration;
330331

331332
fn make_profile(elevations: &[f64]) -> Vec<(DateTime<Utc>, f64, f64)> {
332333
let start = Utc::now();

scheduler/tests/drf_test.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#[cfg(test)]
22
mod tests {
3-
use std::collections::HashMap;
4-
53
use scheduler::{DominantResourceFairness, ResourceShare, ResourceType};
64

75
#[test]

0 commit comments

Comments
 (0)