diff options
| author | Donggyu | 2016-09-25 14:56:46 -0700 |
|---|---|---|
| committer | GitHub | 2016-09-25 14:56:46 -0700 |
| commit | 744ea401553cabfb31c7cc32aecfd8ca2764d1b8 (patch) | |
| tree | 628d4ce1d4bebc228fadd5a74365019f0dc5c62b /src/main/scala/firrtl/Annotations.scala | |
| parent | bd1a3ae2d1130fbfb51ad4ef88349364c931680d (diff) | |
| parent | 2e553ec9859c369938ed035c83040dd80877f893 (diff) | |
Merge pull request #316 from ucb-bar/style-cleanup-take-3
Style cleanup take 3
Diffstat (limited to 'src/main/scala/firrtl/Annotations.scala')
| -rw-r--r-- | src/main/scala/firrtl/Annotations.scala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/scala/firrtl/Annotations.scala b/src/main/scala/firrtl/Annotations.scala index 173006ab..a529d6f1 100644 --- a/src/main/scala/firrtl/Annotations.scala +++ b/src/main/scala/firrtl/Annotations.scala @@ -81,7 +81,7 @@ object Annotations { trait Rigid extends Permissibility { def check(from: Named, tos: Seq[Named], which: Annotation): Unit = tos.size match { case 0 => throw new AnnotationException(s"Cannot remove the rigid annotation ${which.serialize} on ${from.name}") - case 1 => {} + case 1 => case _ => throw new AnnotationException(s"Cannot expand a rigid annotation on ${from.name} -> ${tos.map(_.name)}") } } @@ -92,7 +92,7 @@ object Annotations { trait Firm extends Permissibility { def check(from: Named, tos: Seq[Named], which: Annotation): Unit = tos.size match { case 0 => throw new AnnotationException(s"Cannot remove the firm annotation ${which.serialize} on ${from.name}") - case _ => {} + case _ => } } @@ -163,7 +163,7 @@ object Annotations { def serialize: String = this.toString def update(tos: Seq[Named]): Seq[Annotation] = { check(target, tos, this) - propagate(target, tos, duplicate _) + propagate(target, tos, duplicate) } } @@ -177,7 +177,7 @@ object Annotations { val (namedMap: NamedMap, idMap:IDMap) = //annotations.foldLeft(Tuple2[NamedMap, IDMap](Map.empty, Map.empty)){ annotations.foldLeft((Map.empty: NamedMap, Map.empty: IDMap)){ - (partialMaps: Tuple2[NamedMap, IDMap], annotation: Annotation) => { + (partialMaps: (NamedMap, IDMap), annotation: Annotation) => { val tIDToAnn = partialMaps._1.getOrElse(annotation.target, Map.empty) val pNMap = partialMaps._1 + (annotation.target -> (tIDToAnn + (annotation.tID -> annotation))) |
