Skip to content

Commit d581fa4

Browse files
authored
refactor: use ranked field for pb check (#1040)
1 parent f76650a commit d581fa4

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

bathbot/src/util/osu.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use std::{
66
fmt::{Display, Formatter, Result as FmtResult},
77
io::Cursor,
88
mem::MaybeUninit,
9+
ops::Not,
910
};
1011

1112
use bathbot_model::{OsuStatsParams, ScoreSlim};
@@ -800,7 +801,9 @@ impl PersonalBestIndex {
800801

801802
if idx == 100 {
802803
return Self::NotTop100;
803-
} else if !matches!(status, RankStatus::Ranked | RankStatus::Approved) {
804+
} else if !matches!(status, RankStatus::Ranked | RankStatus::Approved)
805+
|| top100[idx].ranked.is_some_and(bool::not)
806+
{
804807
return Self::IfRanked { idx };
805808
} else if let Some(top) = top100.get(idx) {
806809
if score.is_eq(top) {

0 commit comments

Comments
 (0)