Use more idiomatic Scala

Change-Id: I0d3f847a65e453fcae759732d91bd3e89d4bc953
diff --git a/src/main/scala/com/googlesource/gerrit/plugins/analytics/common/AggregatedCommitHistogram.scala b/src/main/scala/com/googlesource/gerrit/plugins/analytics/common/AggregatedCommitHistogram.scala
index f39fc73..2d30b47 100644
--- a/src/main/scala/com/googlesource/gerrit/plugins/analytics/common/AggregatedCommitHistogram.scala
+++ b/src/main/scala/com/googlesource/gerrit/plugins/analytics/common/AggregatedCommitHistogram.scala
@@ -28,7 +28,7 @@
   extends CommitHistogram {
 
   def includeWithBranches(commit: RevCommit, user: PersonIdent, branches: Set[String]): Unit = {
-    for (branch <- branches) {
+    branches.foreach { branch =>
       val originalStrategy = aggregationStrategy
       this.aggregationStrategy = BY_BRANCH(branch, aggregationStrategy)
       this.include(commit, user)