File tree 2 files changed +7
-4
lines changed
2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -175,7 +175,7 @@ pub struct Problems {
175
175
176
176
#[ derive( Debug , Serialize , Deserialize ) ]
177
177
pub struct StatWithStatus {
178
- stat : Stat ,
178
+ pub stat : Stat ,
179
179
difficulty : Difficulty ,
180
180
paid_only : bool ,
181
181
is_favor : bool ,
@@ -184,7 +184,7 @@ pub struct StatWithStatus {
184
184
}
185
185
186
186
#[ derive( Debug , Serialize , Deserialize ) ]
187
- struct Stat {
187
+ pub struct Stat {
188
188
question_id : u32 ,
189
189
#[ serde( rename = "question__article__slug" ) ]
190
190
question_article_slug : Option < String > ,
@@ -196,7 +196,7 @@ struct Stat {
196
196
question_hide : bool ,
197
197
total_acs : u32 ,
198
198
total_submitted : u32 ,
199
- frontend_question_id : u32 ,
199
+ pub frontend_question_id : u32 ,
200
200
is_new_question : bool ,
201
201
}
202
202
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ fn main() {
30
30
"Please enter a frontend problem id, \n \
31
31
or \" random\" to generate a random one, \n \
32
32
or \" solve $i\" to move problem to solution/, \n \
33
- or \" all\" to initialize all problems"
33
+ or \" all\" to initialize all problems \n "
34
34
) ;
35
35
let mut is_random = false ;
36
36
let mut is_solving = false ;
@@ -71,6 +71,9 @@ fn main() {
71
71
let problems = fetcher:: get_problems ( ) . unwrap ( ) ;
72
72
let mut mod_file_addon = Arc :: new ( Mutex :: new ( vec ! [ ] ) ) ;
73
73
for problem_stat in problems. stat_status_pairs {
74
+ if initialized_ids. contains ( & problem_stat. stat . frontend_question_id ) {
75
+ continue ;
76
+ }
74
77
let mod_file_addon = mod_file_addon. clone ( ) ;
75
78
tasks. push (
76
79
pool. spawn_with_handle ( async move {
You can’t perform that action at this time.
0 commit comments