Skip to content
This repository has been archived by the owner on Nov 18, 2024. It is now read-only.

Commit

Permalink
Merge pull request #41 from jenshalm/remove-unused-params
Browse files Browse the repository at this point in the history
Remove unused implicit parameters
  • Loading branch information
andy-gray committed Sep 30, 2015
2 parents 73c295b + 19b9e12 commit b7e30ed
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/main/scala/uk/gov/hmrc/mongo/AtomicUpdate.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,10 @@ trait AtomicUpdate[T] extends CurrentTime with BSONBuilderHelpers {
* a BSONObjectId in order to understand if the update is an upsert or update.
* @param ec
* @param reads
* @param writes
* @return
*/
def atomicUpsert(finder: BSONDocument, modifierBson: BSONDocument, idAttributeName:String = "_id")
(implicit ec: ExecutionContext, reads: Reads[T], writes: Writes[T])
(implicit ec: ExecutionContext, reads: Reads[T])
: Future[DatabaseUpdate[T]] =
atomicSaveOrUpdate(finder, modifierBson, upsert = true, idAttributeName)
.map{_.getOrElse(
Expand All @@ -41,11 +40,10 @@ trait AtomicUpdate[T] extends CurrentTime with BSONBuilderHelpers {
* a BSONObjectId in order to understand if the update is an upsert or update.
* @param ec
* @param reads
* @param writes
* @return
*/
def atomicSaveOrUpdate(finder: BSONDocument, modifierBson: BSONDocument, upsert: Boolean, idAttributeName:String = "_id")
(implicit ec: ExecutionContext, reads: Reads[T], writes: Writes[T])
(implicit ec: ExecutionContext, reads: Reads[T])
: Future[Option[DatabaseUpdate[T]]] = withCurrentTime {
implicit time =>

Expand Down

0 comments on commit b7e30ed

Please sign in to comment.