Skip to content

Commit

Permalink
fix(sim): fix linux CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mempirate committed Jan 11, 2024
1 parent a1f6450 commit 52518ba
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions msg-sim/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,7 @@ impl Simulator {
pub fn start(&mut self, endpoint: IpAddr, config: SimulationConfig) -> io::Result<usize> {
let id = self.sim_id;

let mut simulation = Simulation {
endpoint,
config,
id,
active_pf: None,
};
let mut simulation = Simulation::new(id, endpoint, config);

simulation.start()?;

Expand Down Expand Up @@ -75,9 +70,21 @@ struct Simulation {
}

impl Simulation {
fn new(id: usize, endpoint: IpAddr, config: SimulationConfig) -> Self {
Self {
id,
endpoint,
config,
#[cfg(target_os = "macos")]
active_pf: None,
}
}

/// Starts the simulation.
#[cfg(target_os = "linux")]
fn start(&mut self) {}
fn start(&mut self) -> io::Result<()> {
Ok(())
}

#[cfg(target_os = "macos")]
fn start(&mut self) -> io::Result<()> {
Expand Down

0 comments on commit 52518ba

Please sign in to comment.