Skip to content

Commit

Permalink
minor code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
carueda committed Aug 27, 2024
1 parent e890ae8 commit d8146c4
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/main/scala/tscfg/Struct.scala
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ case class Struct(

def isLeaf: Boolean = members.isEmpty

def dependencies: Set[String] = {
private def dependencies: Set[String] = {
tsStringValue.toSet ++ members.values.flatMap(_.dependencies)
}

Expand Down
4 changes: 2 additions & 2 deletions src/main/scala/tscfg/generators/java/JavaGen.scala
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ class JavaGen(
case DURATION(_) => s"""c.$getter"""
case _ =>
val (methodName, methodCall) =
tsConfigUtil.basicRequiredGetter(bt, path, genOpts.useDurations)
tsConfigUtil.basicRequiredGetter(bt, path)
listAccessors += methodName -> javaDef(methodName)
methodCall
}
Expand Down Expand Up @@ -576,7 +576,7 @@ class JavaGen(
case DOUBLE => methodNames.dblA
case BOOLEAN => methodNames.blnA
case SIZE => methodNames.sizA
case DURATION(q) => methodNames.durA
case DURATION(_) => methodNames.durA

case _: ObjectAbsType => name.replace('.', '_')

Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/tscfg/generators/scala/ScalaGen.scala
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ private[scala] case class Getter(
case DURATION(_) => s"""c.$getter"""
case _ =>
val (methodName, methodCall) =
tsConfigUtil.basicRequiredGetter(bt, path, genOpts.useDurations)
tsConfigUtil.basicRequiredGetter(bt, path)
listAccessors += methodName -> scalaDef(methodName)
methodCall
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/tscfg/generators/scala/ScalaUtil.scala
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ object ScalaUtil {
"yield"
)

val noArgMethodInScope: List[String] = List(
private val noArgMethodInScope: List[String] = List(
"clone",
"finalize",
"getClass",
Expand Down
1 change: 0 additions & 1 deletion src/main/scala/tscfg/generators/tsConfigUtil.scala
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ object tsConfigUtil {
def basicRequiredGetter(
bt: BasicType,
path: String,
useDurations: Boolean
): (String, String) = {
val methodName = bt match {
case STRING => "$_reqStr"
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/tscfg/model.scala
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ object model {

// $COVERAGE-OFF$
object util {
val IND = " "
private val IND = " "

def format(typ: Type, ind: String = ""): String = typ match {
case b: BasicType => b.toString
Expand Down
3 changes: 0 additions & 3 deletions src/main/scala/tscfg/util.scala
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,4 @@ object util {
}

// $COVERAGE-ON$

val TypesafeConfigClassName: String =
classOf[com.typesafe.config.Config].getName
}

0 comments on commit d8146c4

Please sign in to comment.