7 ms·
A few suggestions: you could remove this kind of idiom: .map( result = { ... }) In the blocking commands example the snippet resembles the Javascript callback
by felipehummel 13y ago
A few suggestions:
you could remove this kind of idiom: .map( result = { ... })
In the blocking commands example the snippet resembles the Javascript callback hell when it could be simpler to read: https://gist.github.com/felipehummel/6187248 https://gist.github.com/felipehummel/6187248
Also, even simplifying it, it still seems overcomplicated. The returning type: Future[Try[Option[(String, ByteString)]]] is too much. Can't you remove the Try or the Option? Futures can already hold either a Sucess or Failure, so isn't the Try redundant?
- etaty 13y agoI removed `Try` in the version 1.1