From 52518bac71c108bbc411a8c14cd5ef37593ec224 Mon Sep 17 00:00:00 2001 From: Jonas Bostoen Date: Thu, 11 Jan 2024 12:30:41 +0100 Subject: [PATCH] fix(sim): fix linux CI --- msg-sim/src/lib.rs | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/msg-sim/src/lib.rs b/msg-sim/src/lib.rs index 009d7a7..5eeb7b8 100644 --- a/msg-sim/src/lib.rs +++ b/msg-sim/src/lib.rs @@ -41,12 +41,7 @@ impl Simulator { pub fn start(&mut self, endpoint: IpAddr, config: SimulationConfig) -> io::Result { 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()?; @@ -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<()> {