浏览代码

Add code suggestions

Sladyn Nunes 3 年之前
父节点
当前提交
e4f29c4b37
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/actions.rs

+ 2 - 2
src/actions.rs

@@ -99,7 +99,7 @@ impl<'a> Action for Step<'a> {
                                         .collect();
 
                                     results
-                                        .entry(format!("{}.{}", repo, name))
+                                        .entry(name)
                                         .or_insert(Vec::new())
                                         .extend(issues_decorator);
                                 }
@@ -118,7 +118,7 @@ impl<'a> Action for Step<'a> {
 
                             match count {
                                 Ok(count) => {
-                                    context.insert(*name, &count);
+                                    *context.entry(*name).or_insert(0) += count;
                                 }
                                 Err(err) => {
                                     eprintln!("ERROR: {}", err);