Skip to content

Commit

Permalink
tweak update_timer_auto_splitter_settings Timer
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexKnauth committed Apr 30, 2024
1 parent 14720b2 commit ea350bb
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/auto_splitting/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@
use crate::{
platform::Arc,
timing::{SharedTimer, TimerPhase},
timing::{self, SharedTimer, TimerPhase},
};

Check failure on line 547 in src/auto_splitting/mod.rs

View workflow job for this annotation

GitHub Actions / Check formatting

Diff in /home/runner/work/livesplit-core/livesplit-core/src/auto_splitting/mod.rs
pub use livesplit_auto_splitting::{settings, wasi_path};
use livesplit_auto_splitting::{
Expand Down Expand Up @@ -671,17 +671,14 @@ impl Runtime {
}

/// Update's the timer's run's auto splitter settings from the Runtime.
pub fn update_timer_auto_splitter_settings(&self, timer: SharedTimer) {
pub fn update_timer_auto_splitter_settings(&self, timer: &mut timing::Timer) {
let Some(settings_map) = self.settings_map() else {

Check failure on line 675 in src/auto_splitting/mod.rs

View workflow job for this annotation

GitHub Actions / Check formatting

Diff in /home/runner/work/livesplit-core/livesplit-core/src/auto_splitting/mod.rs
return;
};
let Ok(mut t) = timer.write() else {
return;
};
if t.run().parsed_auto_splitter_settings().is_none() && settings_map.get("legacy_raw_xml").is_some() {
if timer.run().parsed_auto_splitter_settings().is_none() && settings_map.get("legacy_raw_xml").is_some() {
return;
}
t.set_auto_splitter_settings_map(settings_map);
timer.set_auto_splitter_settings_map(settings_map);
}

/// Unloads the current auto splitter. This will _not_ return an error if
Expand Down

0 comments on commit ea350bb

Please sign in to comment.