File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -21,21 +21,20 @@ func runDescription(cmd *base.Command, args []string) {
21
21
}
22
22
var wg sync.WaitGroup
23
23
limit := 1 << 7
24
- jobs := make (chan * leetcode.StatStatusPairsType , limit )
24
+ jobs := make (chan leetcode.StatStatusPairsType , limit )
25
25
for i := 0 ; i < limit ; i ++ {
26
26
go worker (jobs , & wg )
27
27
}
28
28
problems := leetcode .ProblemsAll ()
29
29
for _ , problem := range problems .StatStatusPairs {
30
- problem := problem
31
30
fmt .Println (problem .Stat .FrontendQuestionId , "\t " + problem .Stat .QuestionTitle )
32
31
wg .Add (1 )
33
- jobs <- & problem
32
+ jobs <- problem
34
33
}
35
34
wg .Wait ()
36
35
}
37
36
38
- func worker (jobs <- chan * leetcode.StatStatusPairsType , wg * sync.WaitGroup ) {
37
+ func worker (jobs <- chan leetcode.StatStatusPairsType , wg * sync.WaitGroup ) {
39
38
for problem := range jobs {
40
39
titleSlug := problem .Stat .QuestionTitleSlug
41
40
question := leetcode .QuestionData (titleSlug , false ).Data .Question
You can’t perform that action at this time.
0 commit comments