mirror of
https://github.com/natsukagami/youmubot.git
synced 2025-04-16 07:18:54 +00:00
Fix a bug where Contest is never fetched with problems
This commit is contained in:
parent
5d6e537ac2
commit
319c38cc2b
1 changed files with 4 additions and 5 deletions
|
@ -45,11 +45,10 @@ impl ContestCache {
|
||||||
Some((c, None)) => match Contest::standings(http, contest_id, |f| f.limit(1, 1)) {
|
Some((c, None)) => match Contest::standings(http, contest_id, |f| f.limit(1, 1)) {
|
||||||
Ok((c, p, _)) => Ok({
|
Ok((c, p, _)) => Ok({
|
||||||
drop(rl);
|
drop(rl);
|
||||||
self.0
|
let mut v = self.0.write();
|
||||||
.write()
|
let v = v.entry(contest_id).or_insert((c, None));
|
||||||
.entry(contest_id)
|
v.1 = Some(p);
|
||||||
.or_insert((c, Some(p)))
|
v.clone()
|
||||||
.clone()
|
|
||||||
}),
|
}),
|
||||||
Err(_) => Ok((c.clone(), None)),
|
Err(_) => Ok((c.clone(), None)),
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Reference in a new issue