From 3131c0daad41dea78bede4517669e376c41a325a Mon Sep 17 00:00:00 2001 From: Jack Koenig Date: Mon, 10 Jan 2022 10:39:52 -0800 Subject: Apply scalafmt Command: sbt scalafmtAll --- src/main/scala/chisel3/util/TransitName.scala | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/main/scala/chisel3/util/TransitName.scala') 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 } -- cgit v1.2.3