We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 06df7ea commit 319055bCopy full SHA for 319055b
src/cmds/pick.rs
@@ -159,10 +159,17 @@ impl Command for PickCommand {
159
let problem = &problems[rand::thread_rng().gen_range(0..problems.len())];
160
problem.fid
161
});
162
+
163
+ let id = match fid {
164
+ Ok(id) => id,
165
+ Err(_) => {
166
+ // Pick random without specify id
167
+ let problem = &problems[rand::thread_rng().gen_range(0..problems.len())];
168
+ problem.fid
169
}
170
};
171
- let r = cache.get_question(fid).await;
172
+ let r = cache.get_question(id).await;
173
174
match r {
175
Ok(q) => println!("{}", q.desc()),
0 commit comments