Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove UnitFrag (closes #249) #260

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion scalatags/js/src/scalatags/JsDom.scala
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ object JsDom
protected[this] implicit def stringAttrX = new GenericAttr[String]
protected[this] implicit def stringStyleX = new GenericStyle[String]
protected[this] implicit def stringPixelStyleX = new GenericPixelStyle[String](stringStyleX)
implicit def UnitFrag(u: Unit): JsDom.StringFrag = new JsDom.StringFrag("")
def makeAbstractTypedTag[T <: dom.Element](tag: String, void: Boolean, namespaceConfig: Namespace): TypedTag[T] = {
TypedTag(tag, Nil, void, namespaceConfig)
}
Expand Down
1 change: 0 additions & 1 deletion scalatags/src/scalatags/Text.scala
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ object Text
protected[this] implicit def stringAttrX = new GenericAttr[String]
protected[this] implicit def stringStyleX = new GenericStyle[String]
protected[this] implicit def stringPixelStyleX = new GenericPixelStyle[String](stringStyleX)
implicit def UnitFrag(u: Unit) = new Text.StringFrag("")
def makeAbstractTypedTag[T <: String](tag: String, void: Boolean, namespaceConfig: Namespace): TypedTag[T] = {
TypedTag(tag, Nil, void)
}
Expand Down
1 change: 0 additions & 1 deletion scalatags/src/scalatags/VirtualDom.scala
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ trait VirtualDom[Output <: FragT, FragT]
protected[this] implicit def stringAttrX = new GenericAttr[String]
protected[this] implicit def stringStyleX = new GenericStyle[String]
protected[this] implicit def stringPixelStyleX = new GenericPixelStyle[String](stringStyleX)
implicit def UnitFrag(u: Unit): VirtualDom.this.StringFrag = new VirtualDom.this.StringFrag("")
def makeAbstractTypedTag[T <: Output](tag: String, void: Boolean, namespaceConfig: Namespace): TypedTag[T] = {
TypedTag(tag, Nil, void, namespaceConfig)
}
Expand Down
5 changes: 0 additions & 5 deletions scalatags/src/scalatags/generic/Util.scala
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,4 @@ trait LowPriUtil[Builder, Output <: FragT, FragT]{
* Renders an Seq of [[FragT]] into a single [[FragT]]
*/
implicit def ArrayFrag[A](xs: Array[A])(implicit ev: A => Frag[Builder, FragT]): Frag[Builder, FragT] = SeqFrag[A](xs.toSeq)

/**
* Lets you put Unit into a scalatags tree, as a no-op.
*/
implicit def UnitFrag(u: Unit): Frag[Builder, FragT]
}
3 changes: 1 addition & 2 deletions scalatags/test/src/scalatags/generic/BasicTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,7 @@ class BasicTests[Builder, Output <: FragT, FragT](omg: Bundle[Builder, Output, F
None: Option[String],
h1("Hello"),
Array(1, 2, 3),
strArr,
()
strArr
),
"""<div>lol1<h1>Hello</h1>123hello</div>"""
)
Expand Down