All Downloads are FREE. Search and download functionalities are using the official Maven repository.

pureconfig.module.cats.syntax.package.scala Maven / Gradle / Ivy

The newest version!
package pureconfig.module.cats

import cats.data.NonEmptyList
import pureconfig.error.{ConfigReaderFailure, ConfigReaderFailures}

package object syntax {

  implicit class ConfigConvertFailureOps(val failures: ConfigReaderFailures) extends AnyVal {

    /**
      * Converts this into a non-empty list of failures.
      *
      * @return a non-empty list of failures.
      */
    def toNonEmptyList: NonEmptyList[ConfigReaderFailure] = NonEmptyList(failures.head, failures.tail.toList)
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy