mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-05 22:55:58 +00:00
Update scalafmt-core to 2.6.0
This commit is contained in:
parent
7a3d2e4dc6
commit
897d91475e
@ -1,4 +1,4 @@
|
|||||||
version = "2.5.3"
|
version = "2.6.0"
|
||||||
|
|
||||||
preset = defaultWithAlign
|
preset = defaultWithAlign
|
||||||
|
|
||||||
|
@ -3,7 +3,6 @@ package docspell.analysis.split
|
|||||||
import fs2.Stream
|
import fs2.Stream
|
||||||
|
|
||||||
/** Splits text into words.
|
/** Splits text into words.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
object TextSplitter {
|
object TextSplitter {
|
||||||
private[this] val trimChars =
|
private[this] val trimChars =
|
||||||
|
@ -221,13 +221,12 @@ object LenientUri {
|
|||||||
if (!s.contains("%")) s
|
if (!s.contains("%")) s
|
||||||
else
|
else
|
||||||
s.foldLeft(("", ByteVector.empty)) {
|
s.foldLeft(("", ByteVector.empty)) {
|
||||||
case ((acc, res), c) =>
|
case ((acc, res), c) =>
|
||||||
if (acc.length == 2) ("", res ++ ByteVector.fromValidHex(acc.drop(1) + c))
|
if (acc.length == 2) ("", res ++ ByteVector.fromValidHex(acc.drop(1) + c))
|
||||||
else if (acc.startsWith("%")) (acc :+ c, res)
|
else if (acc.startsWith("%")) (acc :+ c, res)
|
||||||
else if (c == '%') ("%", res)
|
else if (c == '%') ("%", res)
|
||||||
else (acc, res :+ c.toByte)
|
else (acc, res :+ c.toByte)
|
||||||
}
|
}._2
|
||||||
._2
|
|
||||||
.decodeUtf8
|
.decodeUtf8
|
||||||
.fold(throw _, identity)
|
.fold(throw _, identity)
|
||||||
|
|
||||||
|
@ -13,7 +13,6 @@ import docspell.store.records._
|
|||||||
|
|
||||||
/** Super simple approach to find corresponding meta data to an item
|
/** Super simple approach to find corresponding meta data to an item
|
||||||
* by looking up values from NER in the users address book.
|
* by looking up values from NER in the users address book.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
object FindProposal {
|
object FindProposal {
|
||||||
|
|
||||||
|
@ -7,7 +7,6 @@ import docspell.joex.scheduler.Task
|
|||||||
import docspell.store.records._
|
import docspell.store.records._
|
||||||
|
|
||||||
/** Saves the proposals in the database
|
/** Saves the proposals in the database
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
object SaveProposals {
|
object SaveProposals {
|
||||||
|
|
||||||
|
@ -15,10 +15,9 @@ trait ResponseGenerator[F[_]] {
|
|||||||
w1: EntityEncoder[F, B]
|
w1: EntityEncoder[F, B]
|
||||||
): F[Response[F]] =
|
): F[Response[F]] =
|
||||||
e.fold(
|
e.fold(
|
||||||
a => UnprocessableEntity(a),
|
a => UnprocessableEntity(a),
|
||||||
b => Ok(b)
|
b => Ok(b)
|
||||||
)
|
).map(_.withHeaders(headers: _*))
|
||||||
.map(_.withHeaders(headers: _*))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
implicit final class OptionResponse[A](o: Option[A]) {
|
implicit final class OptionResponse[A](o: Option[A]) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user