Skip to content

Commit 1e46ffe

Browse files
committed
refactor: use correct method
1 parent d361d75 commit 1e46ffe

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎server/src/main.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ async fn handle_message(
524524

525525
if let Some(idx) = current_idx {
526526
let new_idx = match command {
527-
PlaybackCommand::Prev => idx.overflowing_sub(1).0,
527+
PlaybackCommand::Prev => idx.saturating_sub(1),
528528
PlaybackCommand::Next => idx + 1,
529529
_ => unreachable!(),
530530
};

0 commit comments

Comments
 (0)