Skip to content

Commit

Permalink
Align whitespace for givens
Browse files Browse the repository at this point in the history
  • Loading branch information
propensive committed Jan 23, 2025
1 parent e5ce24f commit 7ac6dea
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/core/turbulence.Aggregable.scala
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ object Aggregable:
buffer.toString.tt

given stream: [ElementType, ElementType2]
=> (aggregable: ElementType2 is Aggregable by ElementType)
=> LazyList[ElementType2] is Aggregable by ElementType =
=> (aggregable: ElementType2 is Aggregable by ElementType)
=> LazyList[ElementType2] is Aggregable by ElementType =
element => LazyList(aggregable.aggregate(element))

trait Aggregable:
Expand Down
12 changes: 6 additions & 6 deletions src/core/turbulence.Readable.scala
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ object Readable:
given text: [TextType <: Text] => TextType is Readable by Text = LazyList(_)

given encodingAdapter: [SourceType: Readable by Text] => (encoder: CharEncoder)
=> SourceType is Readable by Bytes =
=> SourceType is Readable by Bytes =
source => encoder.encode(SourceType.stream(source))

given decodingAdapter: [SourceType: Readable by Bytes] => (decoder: CharDecoder)
=> SourceType is Readable by Text =
=> SourceType is Readable by Text =

source => decoder.decode(SourceType.stream(source))

Expand Down Expand Up @@ -70,8 +70,8 @@ object Readable:
LazyList.defer(recur(0L.b))

given bufferedReader: [InType <: ji.BufferedReader]
=> Tactic[StreamError]
=> InType is Readable by Line =
=> Tactic[StreamError]
=> InType is Readable by Line =
reader =>
def recur(count: Memory): LazyList[Line] =
try reader.readLine() match
Expand All @@ -84,8 +84,8 @@ object Readable:
LazyList.defer(recur(0L.b))

given inputStream: [InType <: ji.InputStream]
=> Tactic[StreamError]
=> InType is Readable by Bytes =
=> Tactic[StreamError]
=> InType is Readable by Bytes =
channel.contramap(jn.channels.Channels.newChannel(_).nn)

given channel: Tactic[StreamError] => jn.channels.ReadableByteChannel is Readable by Bytes = channel =>
Expand Down
10 changes: 5 additions & 5 deletions src/core/turbulence.Writable.scala
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import vacuous.*

object Writable:
given outputStreamBytes: [OutType <: ji.OutputStream] => (streamCut: Tactic[StreamError])
=> OutType is Writable by Bytes =
=> OutType is Writable by Bytes =
(outputStream, stream) =>
stream.each: bytes =>
outputStream.write(bytes.mutable(using Unsafe))
Expand All @@ -37,7 +37,7 @@ object Writable:
outputStream.close()

given outputStreamText: (streamCut: Tactic[StreamError], encoder: CharEncoder)
=> ji.OutputStream is Writable by Text =
=> ji.OutputStream is Writable by Text =

(outputStream, stream) =>
stream.each: text =>
Expand All @@ -47,15 +47,15 @@ object Writable:
outputStream.close()

given decodingAdapter: [TargetType: Writable by Text] => (decoder: CharDecoder)
=> TargetType is Writable by Bytes =
=> TargetType is Writable by Bytes =
(target, stream) => TargetType.write(target, decoder.decode(stream))

given encodingAdapter: [TargetType: Writable by Bytes] => (encoder: CharEncoder)
=> TargetType is Writable by Text =
=> TargetType is Writable by Text =
(target, stream) => TargetType.write(target, encoder.encode(stream))

given channel: Tactic[StreamError]
=> jn.channels.WritableByteChannel is Writable by Bytes = (channel, stream) =>
=> jn.channels.WritableByteChannel is Writable by Bytes = (channel, stream) =>
@tailrec
def recur(total: Memory, todo: LazyList[jn.ByteBuffer]): Unit =
todo.flow(()):
Expand Down

0 comments on commit 7ac6dea

Please sign in to comment.