summaryrefslogtreecommitdiff
path: root/src/main/scala/chisel3/util/TransitName.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/scala/chisel3/util/TransitName.scala')
-rw-r--r--src/main/scala/chisel3/util/TransitName.scala13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/main/scala/chisel3/util/TransitName.scala b/src/main/scala/chisel3/util/TransitName.scala
index 97c13696..cc8f2456 100644
--- a/src/main/scala/chisel3/util/TransitName.scala
+++ b/src/main/scala/chisel3/util/TransitName.scala
@@ -42,24 +42,23 @@ object TransitName {
* @param to the thing that will receive the "good" name
* @return the `from` parameter
*/
- def apply[T<:HasId](from: T, to: HasId): T = {
+ def apply[T <: HasId](from: T, to: HasId): T = {
// To transit a name, we need to hook on both the suggestName and autoSeed mechanisms
- from.addSuggestPostnameHook((given_name: String) => {to.suggestName(given_name)})
- from.addAutoPostnameHook((given_name: String) => {to.autoSeed(given_name)})
+ from.addSuggestPostnameHook((given_name: String) => { to.suggestName(given_name) })
+ from.addAutoPostnameHook((given_name: String) => { to.autoSeed(given_name) })
from
}
-
/** Transit a name from one type to another ''and add a suffix''
* @param suffix the suffix to append
* @param from the thing with a "good" name
* @param to the thing that will receive the "good" name
* @return the `from` parameter
*/
- def withSuffix[T<:HasId](suffix: String)(from: T, to: HasId): T = {
+ def withSuffix[T <: HasId](suffix: String)(from: T, to: HasId): T = {
// To transit a name, we need to hook on both the suggestName and autoSeed mechanisms
- from.addSuggestPostnameHook((given_name: String) => {to.suggestName(given_name + suffix)})
- from.addAutoPostnameHook((given_name: String) => {to.autoSeed(given_name + suffix)})
+ from.addSuggestPostnameHook((given_name: String) => { to.suggestName(given_name + suffix) })
+ from.addAutoPostnameHook((given_name: String) => { to.autoSeed(given_name + suffix) })
from
}