Skip to content

Commit

Permalink
Obviate need for Encoding as well as CharEncoder
Browse files Browse the repository at this point in the history
  • Loading branch information
propensive committed Dec 21, 2023
1 parent f86cc2a commit 435d251
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/core/css.scala
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,10 @@ import annotation.targetName
import language.dynamics

object CssStylesheet:
given
(using encoding: Encoding, charEncoder: CharEncoder)
given (using charEncoder: CharEncoder)
: GenericHttpResponseStream[CssStylesheet] with
def mediaType: Text = t"text/css; charset=${encoding.name}"

def content(stylesheet: CssStylesheet): LazyList[IArray[Byte]] =
LazyList(stylesheet.text.bytes)
def mediaType: Text = t"text/css; charset=${charEncoder.encoding.name}"
def content(stylesheet: CssStylesheet): LazyList[IArray[Byte]] = LazyList(stylesheet.text.bytes)

trait Item:
def text: Text
Expand Down

0 comments on commit 435d251

Please sign in to comment.