Skip to content

Commit bf66ad6

Browse files
authored
Merge pull request #539 from keynmol/colors
Render colours in help
2 parents 1e300b4 + d8658fb commit bf66ad6

File tree

8 files changed

+669
-89
lines changed

8 files changed

+669
-89
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package com.monovore.decline
2+
3+
private[decline] trait BinCompat {
4+
@deprecated(
5+
"This method should not be used and is only left for binary compatibility reasons",
6+
"2.6.0"
7+
)
8+
def unapply(
9+
h: Help
10+
): Option[(List[String], cats.data.NonEmptyList[String], List[String], List[String])] =
11+
Some(
12+
h.errors,
13+
h.prefix,
14+
h.usage,
15+
h.body
16+
)
17+
18+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package com.monovore.decline
2+
3+
private[decline] trait BinCompat extends scala.deriving.Mirror.Product {
4+
type MirroredMonoType = Help
5+
6+
@deprecated(
7+
"This method should not be used and is only left for binary compatibility reasons",
8+
"2.6.0"
9+
)
10+
def unapply(
11+
h: Help
12+
): Help = h
13+
14+
def fromProduct(p: scala.Product): Help =
15+
Help(
16+
p.productElement(0).asInstanceOf[List[String]],
17+
p.productElement(1).asInstanceOf[cats.data.NonEmptyList[String]],
18+
p.productElement(2).asInstanceOf[List[String]],
19+
p.productElement(3).asInstanceOf[List[String]]
20+
)
21+
}

0 commit comments

Comments
 (0)