Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
janstenpickle committed Aug 18, 2023
1 parent 7d3afc4 commit dd0db4d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions core/src/main/scala/prometheus4cats/Label.scala
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,14 @@ object Label {

final class Value private (val value: String) extends AnyVal

object Value {
object Value extends ValueLowPriority0 {

implicit def fromShow[A: Show](a: A): Value = new Value(a.show)
implicit def fromString(a: String): Value = new Value(a)

}

trait ValueLowPriority0 {
implicit def fromShow[A: Show](a: A): Value = Value.fromString(a.show)
}

}
2 changes: 1 addition & 1 deletion core/src/test/scala/test/MetricsFactoryDslTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ object MetricsFactoryDslTest {
doubleLabelledGaugeBuilder.asOutcomeRecorder.build

val doubleLabelsGaugeBuilder =
doubleGaugeBuilder.labels(Label.Name("test") -> ((s: String) => s)).label[String]("other_label").build
doubleGaugeBuilder.labels[String](Label.Name("test") -> (s => s)).label[String]("other_label").build

val longGaugeBuilder = gaugeBuilder.ofLong.help("help")
longGaugeBuilder.build
Expand Down

0 comments on commit dd0db4d

Please sign in to comment.