ext/pf2/src/session.rs in pf2-0.6.0 vs ext/pf2/src/session.rs in pf2-0.7.0
- old
+ new
@@ -89,14 +89,13 @@
// Initialize the specified Scheduler
let scheduler: Arc<dyn Scheduler> = match configuration.scheduler {
configuration::Scheduler::Signal => {
Arc::new(SignalScheduler::new(&configuration, Arc::clone(&profile)))
}
- configuration::Scheduler::TimerThread => Arc::new(TimerThreadScheduler::new(
- &configuration,
- Arc::clone(&profile),
- )),
+ configuration::Scheduler::TimerThread => {
+ Arc::new(TimerThreadScheduler::new(&configuration, Arc::clone(&profile)))
+ }
};
let running = Arc::new(AtomicBool::new(false));
let new_thread_watcher = match threads {
@@ -111,17 +110,11 @@
}))
}
configuration::Threads::Targeted(_) => None,
};
- Session {
- configuration,
- scheduler,
- profile,
- running,
- new_thread_watcher,
- }
+ Session { configuration, scheduler, profile, running, new_thread_watcher }
}
fn parse_option_interval_ms(value: VALUE) -> Duration {
if value == Qundef as VALUE {
// Return default
@@ -200,13 +193,10 @@
});
// Raise an ArgumentError if the scheduler is not supported on the current platform
if !cfg!(target_os = "linux") && scheduler == configuration::Scheduler::Signal {
unsafe {
- rb_raise(
- rb_eArgError,
- cstr!("Signal scheduler is not supported on this platform."),
- )
+ rb_raise(rb_eArgError, cstr!("Signal scheduler is not supported on this platform."))
}
}
scheduler
}