From 9959fb0de0abf13350fb29a0957292f9e7ee05b3 Mon Sep 17 00:00:00 2001 From: erikerlandson Date: Tue, 18 Jun 2024 14:30:12 +0000 Subject: [PATCH] deploy: 999342adc36e0dbe9663c2579c32538a95ac7d5b --- coulomb-parser.html | 2 +- coulomb-pureconfig.html | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/coulomb-parser.html b/coulomb-parser.html index 6edda7d1..328d96ee 100644 --- a/coulomb-parser.html +++ b/coulomb-parser.html @@ -174,7 +174,7 @@

< "coulomb.units.info" *: EmptyTuple ] -// dslparser: RuntimeUnitParser = repl.MdocSession$MdocApp$$anon$1@161f2a2a +// dslparser: RuntimeUnitParser = repl.MdocSession$MdocApp$$anon$1@7f57e43b

Parsing can fail, and so the parse method returns an Either object. In the following code, parsing a known unit meter results in a successful Right value.

This example illustrates that unit names parse into a corresponding fully qualified diff --git a/coulomb-pureconfig.html b/coulomb-pureconfig.html index c2e537bd..769c0427 100644 --- a/coulomb-pureconfig.html +++ b/coulomb-pureconfig.html @@ -221,7 +221,7 @@

< bandwidth: {value: 200, unit: "gigabyte / second"} } """) -// source: ConfigObjectSource = pureconfig.ConfigObjectSource@435ea1df +// source: ConfigObjectSource = pureconfig.ConfigObjectSource@7d00134c // this load will succeed, with automatic unit conversions val conf = source.load[Config] @@ -238,7 +238,7 @@

< bandwidth: {value: 200, unit: "gigabyte"} } """) -// bad: ConfigObjectSource = pureconfig.ConfigObjectSource@100d9c54 +// bad: ConfigObjectSource = pureconfig.ConfigObjectSource@7f2d1cb8 // this load will fail because bandwidth units are incompatible val fail = bad.load[Config] @@ -281,7 +281,7 @@

// qsrc: ConfigObjectSource = pureconfig.ConfigObjectSource@760fd4f1 +// qsrc: ConfigObjectSource = pureconfig.ConfigObjectSource@1b5d50ed // loading integer value types will succeed when type matches the config qsrc.load[Quantity[Int, Mega * Byte]] @@ -331,7 +331,7 @@

// source: ConfigObjectSource = pureconfig.ConfigObjectSource@19d18d28 +// source: ConfigObjectSource = pureconfig.ConfigObjectSource@3b93c022 // this load will succeed, with automatic unit conversions val conf = source.load[Config]