From fa50eafe7b0820438ac8cc65582e620c9805fe5d Mon Sep 17 00:00:00 2001 From: Raphael Fakhri <153192858+RaphaelFakhri@users.noreply.github.com> Date: Mon, 2 Nov 2026 23:21:15 +0000 Subject: [PATCH] Fix scope of the Scala 3 CSV encoder example --- docs/examples.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/examples.md b/docs/examples.md index e4706d3..9b5e304 100644 --- a/docs/examples.md +++ b/docs/examples.md @@ -214,17 +214,17 @@ object Passenger: val age = ageOpt.toRight[String]("N/A") Passenger(id, firstName, age, flightNumber, destination) - // Here we define a manual encoder for encoding Passenger classes to a CSV - given csvRowEncoder: CsvRowEncoder[Passenger, String] with - def apply(p: Passenger): CsvRow[String] = - CsvRow.fromNelHeaders( - NonEmptyList.of( - (p.firstName, "first_name"), - (p.age.toString(), "age"), - (p.flightNumber, "flight_number"), - (p.destination, "destination") - ) + // Here we define a manual encoder for encoding Passenger classes to a CSV + given csvRowEncoder: CsvRowEncoder[Passenger, String] with + def apply(p: Passenger): CsvRow[String] = + CsvRow.fromNelHeaders( + NonEmptyList.of( + (p.firstName, "first_name"), + (p.age.toString(), "age"), + (p.flightNumber, "flight_number"), + (p.destination, "destination") ) + ) val input = Files[IO] .readAll(Path("./example.csv"), 1024, Flags.Read)