Skip to content

Commit 931948b

Browse files
committed
Revert "Make invalid timer states unrepresentable (LiveSplit#818)"
This reverts commit 4ebb4bb.
1 parent 628d78a commit 931948b

File tree

6 files changed

+250
-458
lines changed

6 files changed

+250
-458
lines changed

src/run/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -782,10 +782,10 @@ impl Run {
782782
/// # Panics
783783
///
784784
/// This panics if there is no attempt in the Attempt History.
785-
pub fn update_segment_history(&mut self, segments_count: usize) {
785+
pub fn update_segment_history(&mut self, current_split_index: usize) {
786786
let mut previous_split_time = Time::zero();
787787

788-
let segments = &mut self.segments[..segments_count];
788+
let segments = self.segments.iter_mut().take(current_split_index);
789789
let index = self
790790
.attempt_history
791791
.last()

src/timing/timer/active_attempt.rs

Lines changed: 0 additions & 229 deletions
This file was deleted.

0 commit comments

Comments
 (0)