mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-07 05:55:51 +01:00
Move Implicit && to model package object.
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
package util
|
||||
|
||||
import scala.slick.driver.H2Driver.simple._
|
||||
import scala.util.matching.Regex
|
||||
|
||||
/**
|
||||
@@ -25,11 +24,6 @@ object Implicits {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO Should this implicit conversion move to model.Functions?
|
||||
implicit class RichColumn(c1: Column[Boolean]){
|
||||
def &&(c2: => Column[Boolean], guard: => Boolean): Column[Boolean] = if(guard) c1 && c2 else c1
|
||||
}
|
||||
|
||||
implicit class RichString(value: String){
|
||||
def replaceBy(regex: Regex)(replace: Regex.MatchData => Option[String]): String = {
|
||||
val sb = new StringBuilder()
|
||||
|
||||
Reference in New Issue
Block a user